Author Topic: Script Question (fetchdata)  (Read 4575 times)

0 Members and 2 Guests are viewing this topic.

AwwYouDead

  • Goblin Pup
  • *
  • Posts: 30
  • Reputation: +0/-0
    • http://one.clancentral.us
Script Question (fetchdata)
« on: September 9, 2003 11:43 pm CDT »
ok i made a lil gheto ass script to query bank storage. useing the fetchdata from the Dues Hud scripting.
I took
Code: [Select]
DeusRPG::FetchData("bank")
made it
Code: [Select]
DeusRPG::FetchData("bankStorage")
All i really want to query is my Keldrinite count. So could I use this
Code: [Select]
DeusRPG::FetchData("bankStorageKeldrinite") Or would it not work? My storage query works. But i just want to query the specific item. make it much easyer to see exactly how mush you have.
« Last Edit: December 31, 1969 06:00 pm CST by AwwYouDead »

UnderGod

  • Centurian Lord
  • ********
  • Posts: 2,691
  • Reputation: +0/-0
(No subject)
« Reply #1 on: September 10, 2003 12:09 am CDT »
In order to do this, you would first have to store the string returned from the bankstorage to a variable, and then pull keldrinite from that.
« Last Edit: December 31, 1969 06:00 pm CST by UnderGod »
"The right man in the wrong place can make all the difference in the world"

AwwYouDead

  • Goblin Pup
  • *
  • Posts: 30
  • Reputation: +0/-0
    • http://one.clancentral.us
(No subject)
« Reply #2 on: September 10, 2003 12:16 am CDT »
yea i have gotten this far

Code: [Select]
%inv = DeusRPG::FetchData(bankStorage);
      if(string::findSubStr(%inv, "Keldrinnite ") != -1) {
            %keld = round(GetWord(%inv, ?));
       if(%keld >= 1)
             say(0, "I have " @ %keld @ " Keldrinnite");
  }


You see the ? that is where I would put the Order Vale for finding Keldrinite. But im lost after that.


I'm tryign to figure out how to search a string to find out how far down keld is. Am i even in the right neghiborhood?

Im arent even sure if this will work :(
« Last Edit: September 10, 2003 12:57 am CDT by AwwYouDead »

UnderGod

  • Centurian Lord
  • ********
  • Posts: 2,691
  • Reputation: +0/-0
(No subject)
« Reply #3 on: September 10, 2003 12:32 am CDT »
You are down the right neighborhood.
« Last Edit: December 31, 1969 06:00 pm CST by UnderGod »
"The right man in the wrong place can make all the difference in the world"

AwwYouDead

  • Goblin Pup
  • *
  • Posts: 30
  • Reputation: +0/-0
    • http://one.clancentral.us
(No subject)
« Reply #4 on: September 10, 2003 01:02 am CDT »
And better yet how do i make this go to #say so it dont spam global?
« Last Edit: December 31, 1969 06:00 pm CST by AwwYouDead »

Dragoon

  • Gnoll Fighter
  • **
  • Posts: 52
  • Reputation: +0/-0
(No subject)
« Reply #5 on: September 10, 2003 07:49 pm CDT »
Code: [Select]
function KeldriniteCount()
{
%String = DeusRPG::FetchData(bankStorage);
%Found = String::findSubStr(%String, "Keldrinite");
if(%Found != -1) {
%Keldrinite = String::getSubStr(%String, String::findSubStr(%String, "keldrinite"), 999);
%Amount = getWord(%Keldrinite, 1);
}
else %Amount = 0;
say(0, "#say Keldrinite Quantity: " @ %Amount);
}
« Last Edit: December 31, 1969 06:00 pm CST by Dragoon »
I r Dragoon.

AwwYouDead

  • Goblin Pup
  • *
  • Posts: 30
  • Reputation: +0/-0
    • http://one.clancentral.us
(No subject)
« Reply #6 on: September 14, 2003 06:00 am CDT »
Thank you Dragon
« Last Edit: December 31, 1969 06:00 pm CST by AwwYouDead »