Jump to content

Pneuma

Members
  • Posts

    846
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by Pneuma

  1. Basically put this if (isequipped(ITEM ID)) { //ITEM NAME set .@fcast,.@fcast - #;// Number of seconds to reduce }
  2. Oh wow...I didnt realize people would actually use this x3 Since i made the script; anything I can help you with? Mana, to add a new item to start fishing you edit this if (isequipped(2764)) && (isequipped(2775)){ specialeffect2 EF_BUBBLE; set .@fcast,20; if (isequipped(2550)) { //Fisher's_Muffler set .@fcast,.@fcast - 2; } if (isequipped(2443)) { //Fish_Shoes set .@fcast,.@fcast - 2; } if (isequipped(2764)) { //Small_Fishing_Rod set .@fcast,.@fcast - 3; } if (isequipped(2775)) { //Lure set .@fcast,.@fcast - 1; } Make it into if (isequipped(2764)) && (isequipped(2775)) && (isequipped(5317)){
  3. Well What I did was I combineded the 2 posts :/ if(countitem(6096)){ set .@noitem,countitem(6096); if ( query_sql("SELECT `score` FROM `fishladder` WHERE `char_id`="+getcharid(0), .@score) ) { // row exists, update it query_sql "REPLACE INTO `fishladder` SET `score` = "+(.@score+(.@noitem))+",`char_id` = "+getcharid(0)+",`name` = '"+strcharinfo(0)+"'"; } else { // else, insert new row query_sql "INSERT INTO fishladder (`char_id`,`name`,`score`) VALUES ("+getcharid(0)+",'"+strcharinfo(0)+"',"+.@noitem+")"; } When I did that it worked...so..You were close.
  4. #23; It is set to primary key but no new name/id would show up in the DB because there was no Insert command...or update..it was only replace so that only replaces current data, it doesnt add in new data
  5. Magic, Yours fixed it but now It wont add new scores... Like if their name isnt on the board it will not add them when they turn in fish...
  6. Hmm...Well I fixed it for the most part...but it still has 1 problem..It wont change the scores anymore :/ After you turn in the fish for the first time your score wont go up anymore and with your code Magic I get a sql error on my mapserver
  7. The GRF files never lie Search the cardslotcounttable for 2554 and see how many slots it has
  8. Hey guys, I was wondering if you could debug my script... :/ Its changing all the char_ids in the table to the same thing and updating them all... brasilis.gat,265,74,5 script Fishing Board 857,{ mes "[Fishing Board]"; mes "Welcome to the Fishing board!"; next; mes "[Fishing Board]"; mes "What would you like to do?"; menu "View Fishing Ranks",Ranks,"Turn in some fish",Fish; Ranks: query_sql "select name, score from fishladder order by score desc limit "+ getvariableofnpc(.showpage,"FISHCONF"), .@name$, .@score; if ( !getarraysize(.@name$) ) { next; mes "[Fishing Board]"; mes "The ladder currently is empty"; close; } for ( set .@j,0; .@j < getarraysize(.@name$); set .@j, .@j + getvariableofnpc(.showpage,"FISHCONF") ) { next; mes "[Fishing Board]"; for ( set .@i, .@j; .@i < (getvariableofnpc(.showpage,"FISHCONF") + .@j) && .@i < getarraysize(.@name$); set .@i, .@i + 1 ) { mes "^996600"+ (.@i+1) +": ^006699"+ .@name$[.@i] +" ^00AA00["+ .@score[.@i] +"]"; } close; } Fish: next; mes "[Fishing Board]"; mes "What fish would you like to turn in?"; menu "Blue Fish",bFish; bFish: next; mes "Checking inventory..."; sleep2 3000; if(countitem(6096)){ set .@noitem,countitem(6096); if ( query_sql("SELECT `score` FROM `fishladder` WHERE `char_id`="+getcharid(0), .@score) ) { // row exists, update it query_sql "UPDATE `fishladder` SET `score` = `score` + "+.@noitem+",`char_id` = "+getcharid(0)+""; } else { // else, insert new row query_sql "INSERT INTO fishladder (char_id,`name`,score) VALUES ("+getcharid(0)+",'"+strcharinfo(0)+"',"+.@noitem+")"; } delitem 6096,.@noitem; next; mes "[Fishing Board]"; mes "Fish have been retreived and score updated."; close;} else { mes "[Fishing Board]"; mes "You have no fish to turn in."; close;} }
  9. Magic, Your command doesnt do what I need it to...that replaces the whole score with how much you have...I need it to update it not replace query_sql "UPDATE `fishladder` SET `score` = `score` + "+@noitem+",`char_id` = "+getcharid(0)+""; This code worked too. Now theres just 1 more portion of code edit i need for the above command How to make it +2 score for every 1 fish turned it Brian: bFish: next; mes "Checking inventory..."; sleep2 3000; if(countitem(6096)){ set @noitem,countitem(6096); if ( query_sql("SELECT `score` FROM `fishladder` WHERE `char_id`="+getcharid(0), .@score) ) { // row exists, update it query_sql "UPDATE `fishladder` SET `score` = `score` + "+@noitem+",`char_id` = "+getcharid(0)+""; } else { // else, insert new row query_sql "INSERT INTO fishladder (char_id,`name`,score) VALUES ("+getcharid(0)+",'"+strcharinfo(0)+"',"+@noitem+")"; } delitem 6096,@noitem; next; mes "[Fishing Board]"; mes "Fish have been retreived and score updated."; close;} else { mes "[Fishing Board]"; mes "You have no fish to turn in."; close;} Is this how the code would be put?
  10. Well how to edit the command to allow it to +1*amount of fish deleted?
  11. Kiem, I said sprites .-. not png; not to mention I need the collection image too
  12. Thank you chris xD I needed that so much; I really suck with sql commands
  13. Okay I got that...but what about the sql commands? Thats what I mainly need help with... like everytime a player turns in fish; it gives them the score and adds their name to the list
  14. probably...but how would I delete the amount they have?
  15. Okay I need help NOW with this command; I want to know how to invoke the checking of specific ID and the amount of that item in their inventory * getinventorylist; This command sets a bunch of arrays with a complete list of whatever the invoking character has in their inventory, including all the data needed to recreate these items perfectly if they are destroyed. Here's what you get: @inventorylist_id[] - array of item ids. @inventorylist_amount[] - their corresponding item amounts. @inventorylist_equip[] - whether the item is equipped or not. @inventorylist_refine[] - for how much it is refined. @inventorylist_identify[] - whether it's refined. @inventorylist_attribute[] - whether it is broken. @inventorylist_card1[] - These four arrays contain card data for the items. @inventorylist_card2[] These data slots are also used to store names @inventorylist_card3[] inscribed on the items, so you can explicitly check @inventorylist_card4[] if the character owns an item made by a specific craftsman. @inventorylist_count - the number of items in these lists. inbetween the sleep2 1000; command and the next; command, I would like to have it check how much of the item 6096 and then it removes that amount and sends a query_sql to a table and adds +1*each item deleted bFish: next; mes "Checking inventory..."; sleep2 1000; next; If possible; also make me a sql command for when turning in the fish for the first time it adds their name to the ladder; Table: fishladder Columns: char_id, name, score
  16. Hi I need a Fishing Ladder script that shows the Top 3 Players with the highest Score and it shows your own score; to get the score players must turn in fish to an npc and it adds up the score like Talk to NPC -> "Turn in 1st Fish" -> Reads stack of that item, removes it and adds +1 score to your score; Talk to NPC -> "Turn in 2nd Fish" -> Reads stack of that item, removes it and adds +2 score to your score; Talk to NPC -> "Turn in 3rd Fish" -> Reads stack of that item, removes it and adds +3 score to your score; Did I forget to mention my birthday is on the 26th? It'd mean alot if you guys could get this ready before then<3
  17. I have already updated it but right now I cant do anything cause the host in Atlanta is down
  18. I just updated and its still causing error; even with doubling the time
  19. For some reason when setting the time between each Endless Tower to 12 hours generates an error with the time left before you can use the dungeon again... Here is the script we're using I dont know what went wrong but I was hoping someone could fix it. It generates random negative numbers
  20. I think it may have to do with your CP and the account attatched to the login table
  21. Hmm..How did you start using the birthdate system? I didnt see an option for that in 3ceam650
  22. It seems that with 650rev 3ceam and a 20110609 client, when you use % in a sentence and info after it, it generates a random number...I dont know how to fix this...so if someone could people help; Patches I have are packet26.patch, robe sprites, and @recallmap.patch
  23. Let me look into this more EDIT:// Find these two lines E-mail Address (Case Sensitive).# E-mail Address (Case Sensitive).# in your msgstringtable.txt in your datafolder/grf Change it to Please enter Birthdate.# Please enter Birthdate.#
  24. It can be done.... // Amount of time in seconds by which the character deletion is delayed. // Default: 86400 (24 hours) // NOTE: Requires client 2010-08-03aragexeRE or newer. char_del_delay: 86400 set to 0; thats the only way I know of getting rid of it.
×
×
  • Create New...