ID:156795
 
obj
Chuunin_Test
icon = 'Test.dmi'
verb
Take_Test()
set src in oview(1)
if(Chuunintestactive&&!usr.testing&&usr.rank == "Genin")
usr.testing = 1
switch(input("How many basic elements are there?")in list("1","5","2","3"))
if("5")
usr.points += 1
usr << "Correct!"
else
usr << "Wrong!"
switch(input("What rank is Yamata No Jutsu?")in list("A","D","C","S"))
if("S")
usr.points += 1
usr << "Correct!"
else
usr << "Wrong!"
switch(input("Samedare Kekka uses what two weapons?")in list("Two windmills","Kunai and an Explosive tag","Smoke bombs and Mashibishi spikes","Senbon and an Umbrella"))
if("Senbon and an Umbrella")
usr.points += 1
usr << "Correct!"
else
usr << "Wrong!"
switch(input("Sunagakure is in the country of _____...")in list("Sand","Wind","Earth","Bear"))
if("Wind")
usr.points += 1
usr << "Correct!"
else
usr << "Wrong!"

switch(input("What is the kage of Iwagakure called")in list("Old","Tsukikage","Ketsuejikage","Tsuchikage"))
if("Tsuchikage")
usr.points += 1
usr << "Correct!"
else
usr << "Wrong!"
switch(input("Which of these is a Taijutsu?")in list("Shunshin No Jutsu","Tajuu Kage Bunshin No Jutsu","Omote Renge","Souma No Kou"))
if("Omote Renge")
usr.points += 1
usr << "Correct!"
else
usr << "Wrong!"
if(usr.points >= 6)
usr << "You passed the Chuunin exam with [usr.points]/6 points!"
else
usr << "You failed the Chuunin exam with [usr.points]/6 points!"





Alright that's my code for the chuunin ecam, I'm wodnering where would I put the usr.loc = locate(x,y,z) to make them go to the forest of death part? I have an idea but I'm not sure. My idea was to put it right under you passed the Chuunin exam with blah blah points. Do you guys think that will work?
Location to put
                    if(usr.points >= 6)
usr << "You passed the Chuunin exam with [usr.points]/6 points!"
else
usr << "You failed the Chuunin exam with [usr.points]/6 points!"


you want to put it under the part in which they've passed... ex like this

                    if(usr.points >= 6)
usr << "You passed the Chuunin exam with [usr.points]/6 points!"
usr.loc=(X,Y,Z)
else
usr << "You failed the Chuunin exam with [usr.points]/6 points!"

If you notice you would put it under the part as the Person has passed so if they pass it will locate them at FOD.
"Else" They fail and nothing happens
In response to Hokage Yondaime
Alright, thank you so much :)
In response to Hokage Yondaime
Hokage Yondaime wrote:
Location to put
>                     if(usr.points >= 6)
> usr << "You passed the Chuunin exam with [usr.points]/6 points!"
> else
> usr << "You failed the Chuunin exam with [usr.points]/6 points!"
>

you want to put it under the part in which they've passed... ex like this

>                     if(usr.points >= 6)
> usr << "You passed the Chuunin exam with [usr.points]/6 points!"
> usr.loc=(X,Y,Z)
> else
> usr << "You failed the Chuunin exam with [usr.points]/6 points!"
>
>

If you notice you would put it under the part as the Person has passed so if they pass it will locate them at FOD.
"Else" They fail and nothing happens





Here's the catch, I need the people who finish to each teleport to a different spot, in thh Forest of Death right after they finish the test, how do I do that? Like they each teleport to a different spot.
In response to Hokage Yondaime
Hokage Yondaime wrote:
Location to put
     usr.loc=(X,Y,Z)


Using loc like that is really messy and not recommended, by the way.
Look into Move().
In response to Maximus_Alex2003
its suppose to be usr.loc = locate(x,y,z), and I don't know much about move. Can move() make 4 or more people teleport to an area as soon as they finish the test, but not in the exact same spot?
In response to Chaorace
Chaorace wrote:
its suppose to be usr.loc = locate(x,y,z), and I don't know much about move. Can move() make 4 or more people teleport to an area as soon as they finish the test, but not in the exact same spot?

No, it's really a bad practice to directly use atom.loc = locate() without calling Move() along with it.
Overriding Enter() can give you what you want and allow more than 1 /mob to be located in the same "spot".
As far as 4 or more people "teleporting", that will most likely be for().
Heya.

So i read over this topic and the responses so far and id say your best approach would be to do something like this.

obj
Chuunin_Test
icon = 'Test.dmi'
verb
Take_Test()
set src in oview(1)
if(Chuunintestactive&&!usr.testing&&usr.rank == "Genin")
usr.testing = 1
var/xloc
var/yloc
if(usr.created == 1)
switch(input("How many basic elements are there?")in list("1","5","2","3"))
if("5")
usr.points += 1 //dont tell them its right or wrong.
else
return
switch(input("What rank is Yamata No Jutsu?")in list("A","D","C","S"))
if("S")
usr.points += 1
else
return
switch(input("Samedare Kekka uses what two weapons?")in list("Two windmills","Kunai and an Explosive tag","Smoke bombs and Mashibishi spikes","Senbon and an Umbrella"))
if("Senbon and an Umbrella")
usr.points += 1
else
return
switch(input("Sunagakure is in the country of _____...")in list("Sand","Wind","Earth","Bear"))
if("Wind")
usr.points += 1
else
return

switch(input("What is the kage of Iwagakure called")in list("Old","Tsukikage","Ketsuejikage","Tsuchikage"))
if("Tsuchikage")
usr.points += 1
else
return
switch(input("Which of these is a Taijutsu?")in list("Shunshin No Jutsu","Tajuu Kage Bunshin No Jutsu","Omote Renge","Souma No Kou"))
if("Omote Renge")
usr.points += 1
else
return
if(usr.points >= 6)
usr << "You passed the Chuunin exam with [usr.points]/6 points!"
xloc = rand(1,10)
yloc = rand(1,10)
loc = locate(xloc,yloc,1)

else
usr << "You failed the Chuunin exam with [usr.points]/6 points!"


the above code will random you your loc based on what you set the battlefield size to be. and what not. then randomly choose a x co ord and a y co ord and you pre define your z level. and voolah.. random placing. be careful though. that code does not check if you have a building in the middle. (in which case move is the better option i think)

EDIT: And also read the posts by Maximus_Alex2003.
In response to Maximus_Alex2003
I don't want the people in the same spot, I just want them to appear at the 4 locations I mapped. So Enter() or for() , which one should look up in the dm reference (I never used enter and for before I don't think.)
In response to Chaorace
Read my post at the beginning of this topic family tree.

Read the posts by previous posters

and finally look up DM Reference/Guide for unknown stuff
In response to Midgetbuster
Midgetbuster wrote:
Read my post at the beginning of this topic family tree.

Read the posts by previous posters

and finally look up DM Reference/Guide for unknown stuff


I read every post and looked up the move and enter and for proc, I still don't know how I would use them, I'm pretty new to these type of things
In response to Chaorace
well the move proc basically does the same thing as loc.

except it calls all the procedures that take place when a player actually moves itself..

Meaning that if something is dense etc it wont be moved onto that dense area since a character should not originally be able to move there
In response to Midgetbuster
So how would I use it. Like
Move(NewLoc,dir=0)
That's in the dm reference. That will "move" you just like usr.loc?



so

Move(x,y,z,dir=0) like that?
In response to Chaorace
I was also told the Pick() could also work to move a player to one of the 4 locations randomly?
In response to Chaorace
> Move( locate() , direction )

For example:

src.Move(locate(5,5,1),1)


"Called to move the object. By default, client.Move() calls this proc when players use direction keys. The automated movement functions (like walk()) also call this proc. Directly setting the loc variable does not call this procedure. "
In response to Maximus_Alex2003
Maximus_Alex2003 wrote:
> > Move( locate() , direction )
>
> For example:
>
> src.Move(locate(5,5,1),1)
>
>

"Called to move the object. By default, client.Move() calls this proc when players use direction keys. The automated movement functions (like walk()) also call this proc. Directly setting the loc variable does not call this procedure. "



okay, so 5,5,1 is the coords to which to move to I'm guessing, and 1 is 1 on success;(1 on success; got from f1 help thing)
In response to Chaorace
1 is the direction (that the mob will face after movement). It's NORTH.
In response to Garthor
I'm oficially confused now. 1 is north so which is east south and west, also, how does this work for moving 4 people to one of the 4 places I mapped in the FoD?
In response to Chaorace
1 is NORTH, 2 is SOUTH, 4 is EAST, 8 is WEST, 16 is UP, 32 is DOWN.
In response to Chaorace
Chaorace wrote:
Maximus_Alex2003 wrote:
> > > Move( locate() , direction )
> >
> > For example:
> >
> > src.Move(locate(5,5,1),1)
> >
> >

"Called to move the object. By default, client.Move() calls this proc when players use direction keys. The automated movement functions (like walk()) also call this proc. Directly setting the loc variable does not call this procedure. "


Okay so I can use that to loc them to the place I want, how do I make each player go randomly to 1 o the 4 places?

also thansk garthor for telling me those numbers for which si N,S,E,W