ID:141344
 
Problem description:

Okay, so I'm creating a game, and I need help. The game combines Bleach, Naruto, and Sonic (Collision Of Worlds). So I created new clans, for example "arrancar". And I added teleporting verbs for admins, teleporting them to Soul Society, Hueco Mundo, ect. But I don't know how to make a teleporting verb for other people. For example, whoever chooses "Arrancar" as their clan, I want them to have a verb, let's say "Teleport to Hueco Mundo" (36,1,26). But I ONLY want ARRANCAR to have it. So no one else has the verb. But I don't know how to do that.

I basically built the other clans off of other existing clans, but that's not the point. I think that I'm supposes to put the verbs in my mob section right?
For Example:

Code:
mob/ARRANCAR
(Whatever the code is...)


Also, for the same game, I made organizations, and I want to give the people special verbs when they join. Like, for Akatsuki, "Teleport To Akatsuki Base", I have the verb set up, I just don't know how to attach them. Here's the script for my Akatsuki organization:

Code:
mob/owner/verb/MakeAkatLeader(mob/M in world)
set category="Staff"
if(M.rank=="Jounin"&&M.Village!="Akatsuki")
M.Village="Akatsuki"
var/obj/AKAH/H = new()
var/obj/AKAS/S = new()
H.loc=M
S.loc=M
M.akatsukileader=1
M.akatsukimember=1
M.verbs += /mob/akatsuki/verb/InviteA
M.verbs += /mob/akatsuki/verb/BootA
else
usr<<"Cannot be done, Hes either weaker than Jounin or already in Akatsuki."
mob/owner/verb/MakeAkatLeader(mob/M in world)
set category="Staff"
if(M.rank=="Jounin"&&M.Village!="Akatsuki")
M.Village="Akatsuki"
var/obj/AKAH/H = new()
var/obj/AKAS/S = new()
H.loc=M
S.loc=M
M.akatsukileader=1
M.akatsukimember=1
M.verbs += /mob/akatsuki/verb/InviteA
M.verbs += /mob/akatsuki/verb/BootA
else
usr<<"Cannot be done, Hes either weaker than Jounin or already in Akatsuki."


Those two verbs were already set up, but I don't know how to add new ones. The new verb is:

Code:
mob/Admin/verb
AkatsukiB()
set category="Naruto"
set name = "Akatsuki Base"
x = 89
y = 77
z = 10


So, if I could get any help, I would very much appreciate it. Thanks in advance!
Anyone?
Look, not many programmers are gonna help you out when you take someone elses programming. Espeacially when the programming itself isn't the best. Perhaps take someone else's game as a learning basis, but that's it. Well, I'll help you out of the goodness of my heart.

...I don't know how to make a teleporting verb for other people. For example, whoever chooses "Arrancar" as their clan, I want them to have a verb, let's say "Teleport to Hueco Mundo" (36,1,26). But I ONLY want ARRANCAR to have it. So no one else has the verb. But I don't know how to do that.

I basically built the other clans off of other existing clans, but that's not the point. I think that I'm supposes to put the verbs in my mob section right?
For Example:

Code:
> mob/ARRANCAR
> (Whatever the code is...)
>


Yes, that is a way to do it. However, only a mob put under that branch will automatically have the verb. Otherwise, you have to manually give the verb to the other mob.

Also, for the same game, I made organizations, and I want to give the people special verbs when they join. Like, for Akatsuki, "Teleport To Akatsuki Base", I have the verb set up, I just don't know how to attach them. Here's the script for my Akatsuki organization:

Code:
> mob/owner/verb/MakeAkatLeader(mob/M in world)
> set category="Staff"
> if(M.rank=="Jounin"&&M.Village!="Akatsuki")
> M.Village="Akatsuki"
> var/obj/AKAH/H = new()
> var/obj/AKAS/S = new()
> H.loc=M
> S.loc=M
> M.akatsukileader=1
> M.akatsukimember=1
> M.verbs += /mob/akatsuki/verb/InviteA
> M.verbs += /mob/akatsuki/verb/BootA
> else
> usr<<"Cannot be done, Hes either weaker than Jounin or already in Akatsuki."
> mob/owner/verb/MakeAkatLeader(mob/M in world)
> set category="Staff"
> if(M.rank=="Jounin"&&M.Village!="Akatsuki")
> M.Village="Akatsuki"
> var/obj/AKAH/H = new()
> var/obj/AKAS/S = new()
> H.loc=M
> S.loc=M
> M.akatsukileader=1
> M.akatsukimember=1
> M.verbs += /mob/akatsuki/verb/InviteA
> M.verbs += /mob/akatsuki/verb/BootA
> else
> usr<<"Cannot be done, Hes either weaker than Jounin or already in Akatsuki."
>

Those two verbs were already set up, but I don't know how to add new ones. The new verb is:

Code:
> mob/Admin/verb
> AkatsukiB()
> set category="Naruto"
> set name = "Akatsuki Base"
> x = 89
> y = 77
> z = 10
>
>


Okay... I don't even know what your trying to do here. What I do know is that x, y and z are undefined. You need to set them as something. Guessing you mean the location variables, I suggest putting them as src.x, src.y and src.z instead. And even them, you might want to use the locate() proc instead of doing it manually like that.
In response to Demon_F0rce
Thanks for the reply, but I really didn't "copy" someone else's coding, when I got it, it only had half a clan, the Akatsuki Organization, and icons, everything else I put together.

But anyway, I know where to put it now, thank you. But I still don't know what the verb is supposed to look like. So can you give an example?

Also, for the Akatsuki verbs, the one's I made work, but I'll work on that. But how should I set up a verb for only Akatsuki and make it so they automatically have it?
In response to Demon_F0rce
Demon_F0rce wrote:
Well, I'll help you out of the goodness ignorance of my heart.

x, y, and z are built in variables, and so they are always defined for all atoms (/mob, /obj, /turf (/area?) ). The only time x, y, and z do not reference the proc/verb caller's location, is when you override them by defining a local variable (or use type casting/usr/src). In this case, it might be safer to use src.x, src.y, and src.z, but he doesn't need to.

Yes, he should use the locate() proc, but also in conjunction with the Move() proc like my example below.

mob/verb/Teleport()
var/list/Mobs = list()
for(var/client/C)
if(C != key) //since 'key' was not defined as a local variable, it's the same as doing 'src.key'
Mobs += C.mob
if(!Mobs.len) return
var/mob/M = input("","") as null|anything in Mobs
if(M)
Move(locate(M.loc)) //same as doing src.Move()
In response to Spunky_Girl
You have 2 small misses:

Spunky_Girl wrote:
>     for(var/client/C)
> if(C != key)

You're comparing C, a client, to key, a text string. Those will never be equal. :P You want C != src.client, or you could remove the client from the list after the loop instead. Incidentally, "[C]" != src.key would've worked.
Move(locate(M.loc))

M.loc is already a reference to a location (or null), so you don't need to try to find it, which of course won't work.

Also, since this is a teleport-kind-of-movement, he most likely won't want it to be possible for it to fail because of a dense blockade. That can be prevented by temporarily making the moving mob non-dense (example: [link]).
In response to Kaioken
the dense location can also be bypassed by setting the location
src.loc = locate(M.loc)
In response to Pirion
Of course, but that has a distinctly different effect. Only setting the location (or coordinate vars) directly bypasses the movement system, and so isn't robust. It causes Entered() and Exited() not to get called as a result of the movement, and it also bypasses Enter() and Exit()'s permission to move. You don't really want this for most regular movements (if not all) - if you want a movement that never fails due to anything, you should use a custom atom/movable proc that sets the loc, then properly calls Exited() and Entered() (on the loc and the area, when applicable). Or sometimes you'll want something like the Teleport() proc I referred to in my previous post, which only tricks the density checking, so if you have custom Enter()/Exit() rules for movement, they'll take effect.

Also, as I've already said, calling locate() with something's loc won't work, as no syntax of it takes atoms (locations), as obviously when you have a location already you don't need to 'locate' it.