Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-03-2001, 01:21 AM
mhermher mhermher is offline
galase galase!
mhermher's Avatar
Join Date: Jun 2001
Location: Sweden, Stockholm.
Posts: 2,012
mhermher is on a distinguished road
Send a message via ICQ to mhermher Send a message via AIM to mhermher Send a message via Yahoo to mhermher
Question Selling Strings

How do i do that if i have 5 iron and want to sell it and i get 1g for each iron,


This is the script for the rocks (where you get the string)

NPC Code:

if(this.mintype==2)
{
if (this.power<=0)
setplayerprop #c, Iron Found!;
setstring Iron,#v(strtofloat(#s(Iron))+1);
this.mintype=0;
}





Can anyone help me make the selling thing?


-EDIT-
I edited the script so its begin eassyer to script, so can anyone PLEASE help?
__________________
Donate money for my trip to Germany

Adiarde Manager

Last edited by mhermher; 11-03-2001 at 01:23 AM..
Reply With Quote
  #2  
Old 11-03-2001, 04:28 PM
mhermher mhermher is offline
galase galase!
mhermher's Avatar
Join Date: Jun 2001
Location: Sweden, Stockholm.
Posts: 2,012
mhermher is on a distinguished road
Send a message via ICQ to mhermher Send a message via AIM to mhermher Send a message via Yahoo to mhermher
Please help me someone!
__________________
Donate money for my trip to Germany

Adiarde Manager
Reply With Quote
  #3  
Old 11-03-2001, 09:55 PM
TDO2000 TDO2000 is offline
Registered User
TDO2000's Avatar
Join Date: Jul 2001
Location: Germany
Posts: 655
TDO2000 is on a distinguished road
if(playerchats && strequals(#c,sell iron)){
this.priceperiron=5; //change to what u get for iron
if(strtofloat(#s(Iron))>0){
playerrupees+=strtofloat(#s(Iron))*this.priceperir on;
setstring Iron,0;
say2 Here's your money;
}
else {
say2 You have no Iron;
}
}



here we go =)
__________________
No Webhost at the moment
Reply With Quote
Reply


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 10:30 AM.


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