Graal Forums

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

maximus_asinus 01-15-2002 03:44 AM

Scripting
 
I need some help from ubber leet scripters on strtofloat :P I asked b4 but my thread disappeared from lack of posting :(
I have no clue on this and addstring but I am going to read my scripting thingy I got with download,I hopers this helps.
Support Error if you get a chance,skitts,Razzmatazz and Xyrane are in the guild :P

GrowlZP2P 01-15-2002 04:01 AM

Addstring is fairly easy: it combines two different texts into one string. Try this example:

NPC Code:

if (playerenters) {
addstring b2,lol;
sleep 2;
addstring b2,pie;
sleep 2;
insertstring b2,1,for;
}



Insertstring places a new string in between two other strings. And as for strtofloat:

NPC Code:

if (playerenters){
setimg warpdoorani.gif;
}
if (playertouchsme){
setstring pineapples,#v(strtofloat(#s(pineapples))+1);
if (strtofloat(#s(pineapples))=>4){
say2 You have #s(pineapples) pineapples;
}else{
say2 You don't have enough pineapples;
}
}



Strtofloat changes a string to a number which can be read as a variable instead of a string, and can be changed easily. Hope this helped! :D

maximus_asinus 01-16-2002 04:35 AM

Yes it did thx I needed the help,I made a quest using strtofloat but I got a wipe of the hard drive and with the files went my scripting knowledge :(


All times are GMT +2. The time now is 05:22 PM.

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