Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Account Warping (https://forums.graalonline.com/forums/showthread.php?t=7860)

Louis_one 07-22-2001 10:12 PM

Account Warping
 
OK i have look at all threads ...... noone can help me .......

I need an NPC like a Gopolice .

A npc that work on this form : #c Warp {accountname}

i dunno if i can do it without a code in the NPC system

( it is a non-p2p playerworld ( no npc server ))

DOES SOMEBODY CAN HELP ME ?

Silver Knight 07-22-2001 11:58 PM

what do you mean #c Warp [accountame]?
you mean if (strequals #c,Warp account)?

Louis_one 07-23-2001 02:14 AM

no
 
if the npc owner chats : accountname

the account is warped to a level

Merlin 07-23-2001 02:30 AM

if you cant do any of it on your own DONT ASK, :rolleyes:

ownerofbabylon 07-23-2001 04:31 AM

Merlin is so nifty =D hes got that cool saying he likes to use on everyone who doesnt do any of it on their own =D LOL

Anyways, Louis, are you trying to make like a jail warping thing that warps a account to jail??

foxstar70 07-23-2001 06:37 AM

LMAO that is sooooooo easy :)

ownerofbabylon 07-23-2001 08:12 AM

Ya its really easy but I only know how to do it on a NPC server. Do you know how to do it on a free server Fox??

07-23-2001 08:25 AM

to do it you have to use server flags and a system...

BocoC 07-23-2001 08:26 AM

Make a system NPC. In it, use this code:
NPC Code:

if (created || playerenters) {
toweapons -System;
timeout=0.1;
}
if (timeout && isweapon)
CheckForWarp();
DoWhateverSystemStuffYouWant();
timeout=0.1;
}
function CheckForWarp() {
if (strequals(#a,#s(server.warp_player))) {
setlevel2 #s(server.warp_level),#v(strtofloat(#s(server.warp _x))),#v(strtofloat(#s(server.warp_y)));
setstring server.warp_player,;
}
}


Now, for the NPC. Format: warp <account> <level> <x> <y>
NPC Code:

if (playerchats && startswith(warp,#c)) {
tokenize #c;
if (tokenscount==4) {
setstring server.warp_player,#t(1);
setstring server.warp_level,#t(2);
setstring server.warp_x,#t(3);
setstring server.warp_y,#t(4);
}
}


Try that. I just now made that up, so I haven't debugged it.

ownerofbabylon 07-23-2001 08:29 AM

BOCO IS A GENIUS!!!


BTW, HAPPY 17TH BIRTHDAY!!! :D

ownerofbabylon 07-23-2001 08:45 AM

So waht would you have to say to warp them?

General 07-23-2001 12:19 PM

Quote:

setlevel2 #s(server.warp_level),#v(strtofloat(#s(server.warp _x))),#v(strtofloat(#s(server.warp_y)));
setstring server.warp_player,;
setlevel2 is like a break; command...it wont work unless its reversed

setstring server.warp_player,;
setlevel2 #s(server.warp_level),#v(strtofloat(#s(server.warp _x))),#v(strtofloat(#s(server.warp_y)));

LiquidIce00 07-24-2001 07:15 AM

Quote:

Originally posted by General

setlevel2 is like a break; command...it wont work unless its reversed

setstring server.warp_player,;
setlevel2 #s(server.warp_level),#v(strtofloat(#s(server.warp _x))),#v(strtofloat(#s(server.warp_y)));

yes and also u dont need #v in that I dont think.

General 07-24-2001 12:16 PM

LoL, Boco's minions (AKA Bravo Staff) keep telling me how much better he can script than anyone else (3rd best scripter in graal heh) and here i am correcting his mistakes....Bravo plz burn in hell

General 07-24-2001 12:17 PM

Oh yah, i didnt see the #v() in there, you cant use message codes in a real...

BocoC 07-25-2001 08:45 AM

Quote:

setlevel2 is like a break; command...it wont work unless its reversed

setstring server.warp_player,;
setlevel2 #s(server.warp_level),#v(strtofloat(#s(server.warp _x))),#v(strtofloat(#s(server.warp_y)));
No. It will still run the script because it is a weapon. Weapon scripts still run even after a level change.


All times are GMT +2. The time now is 07:35 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.