View Single Post
  #1  
Old 01-26-2002, 09:55 AM
Gohan43331 Gohan43331 is offline
Registered User
Join Date: Jan 2002
Posts: 87
Gohan43331 is on a distinguished road
Send a message via AIM to Gohan43331
Utterly lost on this one...

I am trying to make a 'potion' that the first time you use it, it sets that place as a warp, then subsequent uses causes you to warp there (up to 15 charges)

The problem is, it doesn't exactly warp you where you first used it...
NPC Code:

if (placeset) {
// i-- and set i to charges
setlevel2 #s(filename),strtofloat(#s(oldx)),strtofloat(#s(ol dy));
}
if (havntplaceset) {
setstring filename,#L;
setstring oldx,#v(x));
setstring oldy,#v(y));

set placeset;
unset havntplaceset;
} // And yes, i am using flags, cause i don't care. :P


Example:
oldx=10.1875
oldy=33.09375
x before use = 9.5
y before use = 32
x after use = 10.1875
y after use = 33.09375

adding int to the bolded parts above doesn't help either.

Have tried everything...but now i'm going to ask another mind to help me out.

Thanks,
Gohan
Reply With Quote