Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:21 PM.


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