Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
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 06-26-2006, 05:55 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
converting to gs2

So far, this is the only really annoying thing about gs2: Strings. More specifically, variables in string names. Of course, that might not be the problem here, who knows.
Anyway, this works in gs1, not gs2 I blame the strings, however I may have screwed something up when transfering it to gs2. The action IS received, and the parameter is read.
PHP Code:
if(params[0]=="buy")
  {
    if(
player.rupees>=("serverr.market_" params[1] @ "_price"))
    {
      
addweapon ("serverr.market_" params[1] @ "_item");
      
player.rupees-=("serverr.market_" params[1] @ "_price");
      
with(findplayer(("serverr.market_" params[1] @ "_acct")))
      {
        
player.rupees+=("serverr.market_" params[1] @ "_price");
        
player.chat="You sold something at the market!";
      }
    (
"serverr.market_" params[1] @ "_item")=0;
    (
"serverr.market_" params[1] @ "_acct")=0;
    (
"serverr.market_" params[1] @ "_img")=0;
    (
"serverr.market_" params[1] @ "_price")=0;
    }
  } 
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 01:34 PM.


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