ID:1483523
 
(See the best response by Sir Lazarus.)
kind who make a game within the game I have q
I need another tea which can use to answer this
ex: I want to make a game of rock, paper, scissors
I chose paper.
coder which I use for the other guy estre choose rock, paper, scissors.

I need a coder know the guy meda an answer.
Best response
Your post doesn't make much sense, and I don't see a question mark anywhere in it. What is your question exactly?
tipo que fazer um jogo dentro do jogo eu tenho q
Preciso de outro chá, que pode usar para responder
ex: eu quero fazer um jogo de pedra, papel e tesoura
Eu escolhi papel.
que coder que eu uso para o outro cara escolher pedra, papel e tesoura. e joga comigo

Preciso de um coder para o outro chá meda uma resposta.

sorry I can not speak much English
I had to write in Portuguese
Even your Portuguese is pretty unstructured; the fact you stuck that into a translator just makes it that much worse.

You want to make a mini-game of Rock Paper Scissors with in your current project and you want someone to code this for you is the general gist I'm getting.
Hey! Well, if i understood correctly you want a rock,paper,scissor system.

Try this
mob
var/choice=0

var/list/options = list(1,2,3)


/*DICTIONARY:
1 = rock
2 = paper
3 = scissors

*/


mob/verb/play()
var/p = input("Rock,paper or scissors?")in list("Rock","Paper","Scissors")

if(p=="Rock")
usr.choice = 1
var/b = pick(options) // generating the computer choice...
if(b==1)
world<<"DRAW"
if(b==2)
usr<<"you lose"
if(b==3)
usr<<"you win"

else if(p=="Paper")
usr.choice = 2
var/b = pick(options)
if(b==1)
usr<<"you win"
if(b==2)
world<<"DRAW"
if(b==3)
usr<<"you lose"

else
usr.choice = 3
var/b = pick(options)
if(b==1)
usr<<"you lose"
if(b==2)
usr<<"you win"
if(b==3)
world<<"DRAW"


,MistY,
We really don't like giving out code to someone that doesn't want to try in this section, but I noticed that you followed some of the earlier pitfalls when I was first asked about a system like Rock-Paper-Scissors.

Therefore, I wanted to show what my version would be like.

As programmers, we're lazy (and that isn't a bad thing). We like to reuse all of our code as much as possible, so creating the long chains of logic are not too fun. Also, if we want to maybe make the computer pick one type more than the other, or any changes - this would require updates only to be made in one place. This protects our code from bugs.

Now another problem is - what if we play two games? Your code uses a mob verb of choice, so it isn't scoped to the procedure. This means that there can be race conditions present, especially if we were to introduce multi-player modes.

Here is the example of how I would do it these days:


//PVE Rock-Paper-Scissors

var/static/selections = list("Paper"=1,"Rock"=2,"Scissors"=3)

mob/verb/PVE_RPS()

var/selection = alert("Rock Paper or Scissors?","","Rock","Paper","Scissors")
RPS(selection)

//PVP Rock-Paper-Scissors

mob/verb/PVP_RPS(var/mob/m)

var/selection = alert("Rock Paper or Scissors?","","Rock","Paper","Scissors")
var/selection2 = alert(m,"Rock Paper or Scissors?","","Rock","Paper","Scissors")
src.RPS(selection,selection2)
m.RPS(selection2,selection)

//reuse-functionality

mob/proc/RPS(var/selection,var/computer_selection=null)

var/outcome = ""//for reporting outcome.
if(!computer_selection)//if not multiplayer, generate a selection for computer.
computer_selection = pick(list("Rock","Paper","Scissors"))

if(selection==computer_selection)
outcome = "It was a draw."

else if((selections[selection]-selections[computer_selection])==-1||(selections[selection]-selections[computer_selection])==2)//using the math, either a 2 or -1 is a win, anything else is taken care of by either the equality or the else statement.
outcome = "You won!"

else
outcome = "You lost!"

src << "[selection] vs. [computer_selection]. [outcome]"


You can expand this to include a win/loss record - following the practices of OOP only modifying the src.
o'que I want to be a coder to another tea (person) accepts the game and escoler (stone pael or scissors)

o'que eu quero,ser um coder para um outro chá (pessoa) aceita o jogo e escoler (pedra,pael ou tesoura)

esse é o coder q eu fiz
this is the code I made q

mob/var
Jogador = 0
Animacao = 0





mob/var
Pedra = 0
Papel = 0
Tesoura = 0





mob
verb
Joken_Po123(mob/M in oview(1)) // Verb used for firing the beam
set category = "Entretreirimento"
set name = "JoKenPo"
if(M.Kaiten==1||M.sphere||M.counter)
usr << "[usr] esta se defendendo!"
return
if(usr.caught)
usr<<"Your captured"
return
if(usr.Frozen)
usr<<"Your frozen"
return
if(usr.captured)
usr<<"Your captured"
return
if(M.froze)
return
if(usr.froze)
usr<<"Your frozen"
return
if(usr.resting)
usr<<"Not while resting"
return
if(usr.meditating)
usr<<"Not while meditating"
return
else
view(6)<<"JoKenPo - [usr] vs [M]"
usr.Frozen=1
usr.froze= 1
M.Frozen=1
M.froze = 1
usr.Pedra = 0
usr.Papel= 0
usr.Tesoura = 0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
usr.overlays += /obj/PPT123
M.overlays += /obj/PPT123
flick("JoKenPo",usr)
flick("JoKenPo",M)
sleep(50)
if(usr)
switch(input("JoKenPo - Escolha")in list("Pedra","Papel","Tesoura"))
if("Pedra")
usr.Pedra = 1
usr.Papel= 0
usr.Tesoura = 0
if("Papel")
usr.Pedra = 0
usr.Papel= 1
usr.Tesoura = 0
if("Tesoura")
usr.Pedra = 0
usr.Papel= 0
usr.Tesoura = 1
if(M)
switch(input("JoKenPo - Escolha")in list("Pedra","Papel","Tesoura"))
if("Pedra")
M.Pedra = 1
M.Papel= 0
M.Tesoura = 0
if("Papel")
M.Pedra = 0
M.Papel= 1
M.Tesoura = 0
if("Tesoura")
M.Pedra = 0
M.Papel= 0
M.Tesoura = 1
sleep(5)
usr.overlays -= /obj/PPT123
M.overlays -= /obj/PPT123
flick("JoKenPo",usr)
flick("JoKenPo",M)
sleep(5)
flick("JoKenPo123",usr)
flick("JoKenPo123",M)
if(usr.Pedra == 1&&M.Pedra == 1)
view(6)<<"[usr] e [M] empataram!!!"
usr.overlays += /obj/Pedra
M.overlays += /obj/Pedra
sleep(50)
usr.overlays -= /obj/Tesoura
M.overlays -= /obj/Tesoura
usr.overlays -= /obj/Papel
M.overlays -= /obj/Papel
usr.overlays -= /obj/Pedra
M.overlays -= /obj/Pedra
usr.froze = 0
usr.Frozen = 0
M.froze = 0
M.Frozen=0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
return
if(usr.Papel == 1&&M.Papel == 1)
view(6)<<"[usr] e [M] empataram!!!"
usr.overlays += /obj/Papel
M.overlays += /obj/Papel
sleep(50)
usr.overlays -= /obj/Tesoura
M.overlays -= /obj/Tesoura
usr.overlays -= /obj/Papel
M.overlays -= /obj/Papel
usr.overlays -= /obj/Pedra
M.overlays -= /obj/Pedra
usr.froze = 0
usr.Frozen = 0
M.froze = 0
M.Frozen=0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
return
if(usr.Tesoura == 1&&M.Tesoura == 1)
view(6)<<"[usr] e [M] empataram!!!"
usr.overlays += /obj/Tesoura
M.overlays += /obj/Tesoura
sleep(50)
usr.overlays -= /obj/Tesoura
M.overlays -= /obj/Tesoura
usr.overlays -= /obj/Papel
M.overlays -= /obj/Papel
usr.overlays -= /obj/Pedra
M.overlays -= /obj/Pedra
usr.froze = 0
usr.Frozen = 0
M.froze = 0
M.Frozen=0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
return
if(usr.Pedra == 1&&M.Tesoura == 1)
view(6)<<"[usr] Ganhou [M]!!!"
usr.overlays += /obj/Pedra
M.overlays += /obj/Tesoura
usr.Jogador += 1
M.Jogador -= 1
sleep(50)
usr.overlays -= /obj/Tesoura
M.overlays -= /obj/Tesoura
usr.overlays -= /obj/Papel
M.overlays -= /obj/Papel
usr.overlays -= /obj/Pedra
M.overlays -= /obj/Pedra
usr.froze = 0
usr.Frozen = 0
M.froze = 0
M.Frozen=0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
return
if(usr.Pedra == 1&&M.Papel == 1)
view(6)<<"[M] Ganhou [usr]!!!"
usr.overlays += /obj/Pedra
M.overlays += /obj/Papel
M.Jogador += 1
usr.Jogador -= 1
sleep(50)
usr.overlays -= /obj/Tesoura
M.overlays -= /obj/Tesoura
usr.overlays -= /obj/Papel
M.overlays -= /obj/Papel
usr.overlays -= /obj/Pedra
M.overlays -= /obj/Pedra
usr.froze = 0
usr.Frozen = 0
M.froze = 0
M.Frozen=0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
return
if(usr.Papel == 1&&M.Pedra == 1)
view(6)<<"[usr] Ganhou [M]!!!"
usr.overlays += /obj/Papel
M.overlays += /obj/Pedra
M.Jogador -= 1
usr.Jogador += 1
sleep(50)
usr.overlays -= /obj/Tesoura
M.overlays -= /obj/Tesoura
usr.overlays -= /obj/Papel
M.overlays -= /obj/Papel
usr.overlays -= /obj/Pedra
M.overlays -= /obj/Pedra
usr.froze = 0
usr.Frozen = 0
M.froze = 0
M.Frozen=0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
return
if(usr.Papel == 1&&M.Tesoura == 1)
view(6)<<"[M] Ganhou [usr]!!!"
usr.overlays += /obj/Papel
M.overlays += /obj/Tesoura
M.Jogador += 1
usr.Jogador -= 1
sleep(50)
usr.overlays -= /obj/Tesoura
M.overlays -= /obj/Tesoura
usr.overlays -= /obj/Papel
M.overlays -= /obj/Papel
usr.overlays -= /obj/Pedra
M.overlays -= /obj/Pedra
usr.froze = 0
usr.Frozen = 0
M.froze = 0
M.Frozen=0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
return
if(usr.Tesoura == 1&&M.Pedra == 1)
view(6)<<"[M] Ganhou [usr]!!!"
usr.overlays += /obj/Tesoura
M.overlays += /obj/Pedra
M.Jogador += 1
usr.Jogador -= 1
sleep(50)
usr.overlays -= /obj/Tesoura
M.overlays -= /obj/Tesoura
usr.overlays -= /obj/Papel
M.overlays -= /obj/Papel
usr.overlays -= /obj/Pedra
M.overlays -= /obj/Pedra
usr.froze = 0
usr.Frozen = 0
M.froze = 0
M.Frozen=0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
return
if(usr.Tesoura == 1&&M.Papel == 1)
view(6)<<"[usr] Ganhou [M]!!!"
usr.overlays += /obj/Tesoura
M.overlays += /obj/Papel
M.Jogador -= 1
usr.Jogador += 1
sleep(50)
usr.overlays -= /obj/Tesoura
M.overlays -= /obj/Tesoura
usr.overlays -= /obj/Papel
M.overlays -= /obj/Papel
usr.overlays -= /obj/Pedra
M.overlays -= /obj/Pedra
usr.froze = 0
usr.Frozen = 0
M.froze = 0
M.Frozen=0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
return
if(usr.Papel == 0&&usr.Pedra == 0&&usr.Tesoura == 0)
view(6)<<"[usr] nao escolheu nada por isso [M] ganhou 1 ponto!!!"
M.Jogador += 1
sleep(50)
usr.overlays -= /obj/Tesoura
M.overlays -= /obj/Tesoura
usr.overlays -= /obj/Papel
M.overlays -= /obj/Papel
usr.overlays -= /obj/Pedra
M.overlays -= /obj/Pedra
usr.froze = 0
usr.Frozen = 0
M.froze = 0
M.Frozen=0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
return
if(M.Papel == 0&&M.Pedra == 0&&M.Tesoura == 0)
view(6)<<"[usr] nao escolheu nada por isso [M] ganhou 1 ponto!!!"
usr.Jogador += 1
sleep(50)
usr.overlays -= /obj/Tesoura
M.overlays -= /obj/Tesoura
usr.overlays -= /obj/Papel
M.overlays -= /obj/Papel
usr.overlays -= /obj/Pedra
M.overlays -= /obj/Pedra
usr.froze = 0
usr.Frozen = 0
M.froze = 0
M.Frozen=0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
return








obj/Pedra
layer = MOB_LAYER+1
icon = 'Joken_Po.dmi'
icon_state = "Pedra"
pixel_y = 32






obj/Papel
layer = MOB_LAYER+1
icon = 'Joken_Po.dmi'
icon_state = "Papel"
pixel_y = 32





obj/Tesoura
layer = MOB_LAYER+1
icon = 'Joken_Po.dmi'
icon_state = "Tesoura"
pixel_y = 32







obj/PPT123
layer = MOB_LAYER+1
icon = 'Joken_Po123.dmi'
icon_state = "PPT123"
pixel_y = 32



sorry did not want to leave the space
Next time, it would be best to create your own thread rather than replying to an old thread.

Please always leave <dm> </dm> when posting code, to ensure formatting is applied.

This code has so much redundancy and useless commands in it. It makes it look very bloated, and complicated, more than it should. You're also adding paths to the overlays (you want to add instances of the icon), but you don't need to attempt to take each type out - just keep track of the icons you add.

The vars are defined on the mob scope. This is not needed, as you never use them outside of the proc.
Try that again but begin your code with <dm>
mob/var
Jogador = 0
Animacao = 0





mob/var
Pedra = 0
Papel = 0
Tesoura = 0





mob
verb
Joken_Po123(mob/M in oview(1)) // Verb used for firing the beam
set category = "Entretreirimento"
set name = "JoKenPo"
if(M.Kaiten==1||M.sphere||M.counter)
usr << "[usr] esta se defendendo!"
return
if(usr.caught)
usr<<"Your captured"
return
if(usr.Frozen)
usr<<"Your frozen"
return
if(usr.captured)
usr<<"Your captured"
return
if(M.froze)
return
if(usr.froze)
usr<<"Your frozen"
return
if(usr.resting)
usr<<"Not while resting"
return
if(usr.meditating)
usr<<"Not while meditating"
return
else
view(6)<<"JoKenPo - [usr] vs [M]"
usr.Frozen=1
usr.froze= 1
M.Frozen=1
M.froze = 1
usr.Pedra = 0
usr.Papel= 0
usr.Tesoura = 0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
usr.overlays += /obj/PPT123
M.overlays += /obj/PPT123
flick("JoKenPo",usr)
flick("JoKenPo",M)
sleep(50)
if(usr)
switch(input("JoKenPo - Escolha")in list("Pedra","Papel","Tesoura"))
if("Pedra")
usr.Pedra = 1
usr.Papel= 0
usr.Tesoura = 0
if("Papel")
usr.Pedra = 0
usr.Papel= 1
usr.Tesoura = 0
if("Tesoura")
usr.Pedra = 0
usr.Papel= 0
usr.Tesoura = 1
if(M)
switch(input("JoKenPo - Escolha")in list("Pedra","Papel","Tesoura"))
if("Pedra")
M.Pedra = 1
M.Papel= 0
M.Tesoura = 0
if("Papel")
M.Pedra = 0
M.Papel= 1
M.Tesoura = 0
if("Tesoura")
M.Pedra = 0
M.Papel= 0
M.Tesoura = 1
sleep(5)
usr.overlays -= /obj/PPT123
M.overlays -= /obj/PPT123
flick("JoKenPo",usr)
flick("JoKenPo",M)
sleep(5)
flick("JoKenPo123",usr)
flick("JoKenPo123",M)
if(usr.Pedra == 1&&M.Pedra == 1)
view(6)<<"[usr] e [M] empataram!!!"
usr.overlays += /obj/Pedra
M.overlays += /obj/Pedra
sleep(50)
usr.overlays -= /obj/Tesoura
M.overlays -= /obj/Tesoura
usr.overlays -= /obj/Papel
M.overlays -= /obj/Papel
usr.overlays -= /obj/Pedra
M.overlays -= /obj/Pedra
usr.froze = 0
usr.Frozen = 0
M.froze = 0
M.Frozen=0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
return
if(usr.Papel == 1&&M.Papel == 1)
view(6)<<"[usr] e [M] empataram!!!"
usr.overlays += /obj/Papel
M.overlays += /obj/Papel
sleep(50)
usr.overlays -= /obj/Tesoura
M.overlays -= /obj/Tesoura
usr.overlays -= /obj/Papel
M.overlays -= /obj/Papel
usr.overlays -= /obj/Pedra
M.overlays -= /obj/Pedra
usr.froze = 0
usr.Frozen = 0
M.froze = 0
M.Frozen=0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
return
if(usr.Tesoura == 1&&M.Tesoura == 1)
view(6)<<"[usr] e [M] empataram!!!"
usr.overlays += /obj/Tesoura
M.overlays += /obj/Tesoura
sleep(50)
usr.overlays -= /obj/Tesoura
M.overlays -= /obj/Tesoura
usr.overlays -= /obj/Papel
M.overlays -= /obj/Papel
usr.overlays -= /obj/Pedra
M.overlays -= /obj/Pedra
usr.froze = 0
usr.Frozen = 0
M.froze = 0
M.Frozen=0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
return
if(usr.Pedra == 1&&M.Tesoura == 1)
view(6)<<"[usr] Ganhou [M]!!!"
usr.overlays += /obj/Pedra
M.overlays += /obj/Tesoura
usr.Jogador += 1
M.Jogador -= 1
sleep(50)
usr.overlays -= /obj/Tesoura
M.overlays -= /obj/Tesoura
usr.overlays -= /obj/Papel
M.overlays -= /obj/Papel
usr.overlays -= /obj/Pedra
M.overlays -= /obj/Pedra
usr.froze = 0
usr.Frozen = 0
M.froze = 0
M.Frozen=0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
return
if(usr.Pedra == 1&&M.Papel == 1)
view(6)<<"[M] Ganhou [usr]!!!"
usr.overlays += /obj/Pedra
M.overlays += /obj/Papel
M.Jogador += 1
usr.Jogador -= 1
sleep(50)
usr.overlays -= /obj/Tesoura
M.overlays -= /obj/Tesoura
usr.overlays -= /obj/Papel
M.overlays -= /obj/Papel
usr.overlays -= /obj/Pedra
M.overlays -= /obj/Pedra
usr.froze = 0
usr.Frozen = 0
M.froze = 0
M.Frozen=0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
return
if(usr.Papel == 1&&M.Pedra == 1)
view(6)<<"[usr] Ganhou [M]!!!"
usr.overlays += /obj/Papel
M.overlays += /obj/Pedra
M.Jogador -= 1
usr.Jogador += 1
sleep(50)
usr.overlays -= /obj/Tesoura
M.overlays -= /obj/Tesoura
usr.overlays -= /obj/Papel
M.overlays -= /obj/Papel
usr.overlays -= /obj/Pedra
M.overlays -= /obj/Pedra
usr.froze = 0
usr.Frozen = 0
M.froze = 0
M.Frozen=0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
return
if(usr.Papel == 1&&M.Tesoura == 1)
view(6)<<"[M] Ganhou [usr]!!!"
usr.overlays += /obj/Papel
M.overlays += /obj/Tesoura
M.Jogador += 1
usr.Jogador -= 1
sleep(50)
usr.overlays -= /obj/Tesoura
M.overlays -= /obj/Tesoura
usr.overlays -= /obj/Papel
M.overlays -= /obj/Papel
usr.overlays -= /obj/Pedra
M.overlays -= /obj/Pedra
usr.froze = 0
usr.Frozen = 0
M.froze = 0
M.Frozen=0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
return
if(usr.Tesoura == 1&&M.Pedra == 1)
view(6)<<"[M] Ganhou [usr]!!!"
usr.overlays += /obj/Tesoura
M.overlays += /obj/Pedra
M.Jogador += 1
usr.Jogador -= 1
sleep(50)
usr.overlays -= /obj/Tesoura
M.overlays -= /obj/Tesoura
usr.overlays -= /obj/Papel
M.overlays -= /obj/Papel
usr.overlays -= /obj/Pedra
M.overlays -= /obj/Pedra
usr.froze = 0
usr.Frozen = 0
M.froze = 0
M.Frozen=0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
return
if(usr.Tesoura == 1&&M.Papel == 1)
view(6)<<"[usr] Ganhou [M]!!!"
usr.overlays += /obj/Tesoura
M.overlays += /obj/Papel
M.Jogador -= 1
usr.Jogador += 1
sleep(50)
usr.overlays -= /obj/Tesoura
M.overlays -= /obj/Tesoura
usr.overlays -= /obj/Papel
M.overlays -= /obj/Papel
usr.overlays -= /obj/Pedra
M.overlays -= /obj/Pedra
usr.froze = 0
usr.Frozen = 0
M.froze = 0
M.Frozen=0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
return
if(usr.Papel == 0&&usr.Pedra == 0&&usr.Tesoura == 0)
view(6)<<"[usr] nao escolheu nada por isso [M] ganhou 1 ponto!!!"
M.Jogador += 1
sleep(50)
usr.overlays -= /obj/Tesoura
M.overlays -= /obj/Tesoura
usr.overlays -= /obj/Papel
M.overlays -= /obj/Papel
usr.overlays -= /obj/Pedra
M.overlays -= /obj/Pedra
usr.froze = 0
usr.Frozen = 0
M.froze = 0
M.Frozen=0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
return
if(M.Papel == 0&&M.Pedra == 0&&M.Tesoura == 0)
view(6)<<"[usr] nao escolheu nada por isso [M] ganhou 1 ponto!!!"
usr.Jogador += 1
sleep(50)
usr.overlays -= /obj/Tesoura
M.overlays -= /obj/Tesoura
usr.overlays -= /obj/Papel
M.overlays -= /obj/Papel
usr.overlays -= /obj/Pedra
M.overlays -= /obj/Pedra
usr.froze = 0
usr.Frozen = 0
M.froze = 0
M.Frozen=0
M.Pedra = 0
M.Papel= 0
M.Tesoura = 0
return








obj/Pedra
layer = MOB_LAYER+1
icon = 'Joken_Po.dmi'
icon_state = "Pedra"
pixel_y = 32






obj/Papel
layer = MOB_LAYER+1
icon = 'Joken_Po.dmi'
icon_state = "Papel"
pixel_y = 32





obj/Tesoura
layer = MOB_LAYER+1
icon = 'Joken_Po.dmi'
icon_state = "Tesoura"
pixel_y = 32







obj/PPT123
layer = MOB_LAYER+1
icon = 'Joken_Po123.dmi'
icon_state = "PPT123"
pixel_y = 32
coder does not know the other person use to pick and play, and do not even know where to.
I'm still noob n I can do avansado encoding. if u can help and get meda compress the coder handle and make seri very grateful
use input() or alert() with control structures (if,else if,else).
In response to Pedro123456
Pedro123456 wrote:
coder does not know the other person use to pick and play, and do not even know where to.
I'm still noob n I can do avansado encoding. if u can help and get meda compress the coder handle and make seri very grateful

I hope what you want i mix code of Misticone whit you code just replace the code you have for this and already
credits Misticone

mob
var
choice=0
Jogador=0
mob/verb/Joken_Po123(mob/M in oview(1))
if(M.client)
if(M.Kaiten==1||M.sphere||M.counter)
usr << "[usr] esta se defendendo!"
return
if(usr.caught||usr.captured)
usr<<"Your captured"
return
if(M.froze||M.choice||usr.choice)
return
if(usr.froze||usr.Frozen)
usr<<"Your frozen"
return
if(usr.resting||usr.meditating)
usr<<"Not while resting OR meditating"
return

view(6)<<"JoKenPo - [usr] vs [M]"
usr.Frozen=1
usr.froze= 1
usr.overlays += /obj/PPT123
M.Frozen=1
M.froze = 1
M.overlays += /obj/PPT123
flick("JoKenPo",usr)
flick("JoKenPo",M)
sleep(50)

var/p = input("Rock,paper or scissors?")in list("Rock","Paper","Scissors")//you
var/q = input(M,"Rock,paper or scissors?")in list("Rock","Paper","Scissors")//other usr
usr.choice=1
M.choice=1
sleep(5)
usr.overlays -= /obj/PPT123
M.overlays -= /obj/PPT123
flick("JoKenPo",usr)
flick("JoKenPo",M)
sleep(5)
flick("JoKenPo123",usr)
flick("JoKenPo123",M)
if(p=="Rock"||q=="Scissors")
usr<<"you win"
usr.Jogador += 1
M.overlays += /obj/Tesoura
usr.overlays += /obj/Pedra

if(p=="Scissors"||q=="Rock")
usr<<"you lose"
usr.overlays += /obj/Tesoura
M.overlays += /obj/Pedra
M<<"Ganhou"
M.Jogador += 1

if(p=="Scissors"||q=="Paper")
usr<<"you win"
usr.Jogador += 1
M<<"you lose"
usr.overlays += /obj/Tesoura
M.overlays += /obj/Papel
if(p=="Paper"||q=="Scissors")
usr<<"you lose"
M<<"you win"
M.Jogador += 1
M.overlays += /obj/Tesoura
usr.overlays += /obj/Papel
if(p=="Paper"||q=="Rock")
usr<<"you win"
usr.Jogador += 1
M<<"you lose"
usr.overlays += /obj/Papel
M.overlays += /obj/Pedra
if(p=="Rock"||q=="Paper")
usr<<"you lose"
M<<"you win"
M.Jogador += 1
usr.overlays += /obj/Papel
M.overlays += /obj/Pedra
if(p==q)
usr<<"empataram"
M<<"empataram"
sleep(50)
usr.overlays -= /obj/Tesoura
M.overlays -= /obj/Tesoura
usr.overlays -= /obj/Papel
M.overlays -= /obj/Papel
usr.overlays -= /obj/Pedra
M.overlays -= /obj/Pedra
usr.choice=1
M.choice=1
usr.froze = 0
usr.Frozen = 0
M.froze = 0
M.Frozen=0
return

oh thank you :D it's good to know that i could help ;)


,MistY,
obrigado!
só mais uma coisa que tipo de coder eu uso pra conseguir controla um boneco aleio um personagem de uma outra pessoa
thank you!
one more thing what kind of coder I use to get a dummy allele controls a character of another person
humm sorry but i didn't understand your question. ""a dummy allele controls a character of another person?"" You mean how can you make a player be able to control another player? Could you repeat your question please? sorry.


Sorry

Thanks,
,MistY,
In response to Misticone
Misticone wrote:
humm sorry but i didn't understand your question. ""a dummy allele controls a character of another person?"" You mean how can you make a player be able to control another player? Could you repeat your question please? sorry.


Sorry

Thanks,
,MistY,

think it relates to what you say Misticone,for that could place a variable in the move() proc, example:
mob/var/controlmob=""

mob/verb
control(var/mob/M in oview())
if(M.client)//only users
usr.client.perspective = EYE_PERSPECTIVE
usr.client.eye = M
usr.controlmob=M

client
North()
..()
if(mob.controlmob)
step(mob.controlmob,NORTH)
return
JEY_SENSEY code is excelent but i'll just show another possible way to do this. I really like to use lists in my codes so I would do something like this:

mob/var/able_to_control = 0  // if this is equal to 0 then the player isn't able to control another player

mob/var/list/players_to_control = list() //let's make a list

mob/var/list/choosed_player = list() // let's make another list

mob/verb/Control()
if(src.able_to_control == 1){src.able_to_control = 0;src.client.eye = src; src.client.perspective= EYE_PERSPECTIVE}; //If you click in this verb while you're controling someone then you'll stop controling that person
else// if you're not controling someone at the moment then:
for(var/mob/player/m in world)
src.players_to_control +=m //so our players_to_control list will contain all the players in the game

var/a = input("Who do you want to control?") as null| mob in players_to_control //Now you choose the player you want to control

src.client.eye = a //this will change your eye to be able to see the selected player
src.client.perspective= EYE_PERSPECTIVE

src.able_to_control = 1 //if this is equal to 1 then the player is able to control another player

if(length(src.choosed_player)>0){src.choosed_player = list()};//if list length is higher than 0 then this will erase whatever is in the list
src.choosed_player +=a //now let's add the selected player to the list

client

North()

if(usr.able_to_control == 0){..();} // if the mob isn't controling anyone then proced normally

else{for(var/p in usr.choosed_player){step(p,NORTH)};}; //else make the mob that is being controled step north


South()

if(usr.able_to_control == 0){..();}// if the mob isn't controling anyone then proced normally

else{for(var/p in usr.choosed_player){step(p,SOUTH)};};//else make the mob that is being controled step south


Thanks,
,MistY,
Page: 1 2