Jump to content

Lil Troll

Members
  • Posts

    276
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Lil Troll

  1. am sorry? i didnt get what you have said, actually i almost finished the script i just took a break and now doing it again, so you mean, everytime that the equipment breaks it will give you prize right?
  2. I am going to read your script first, just give me bit, then gonna finish your script, just change the npc dialogue and make a quest for each npc. I will just make the npc on chain quest.
  3. Ok so what restriction should I used? Account based restriction per item? I will make the npc automatic refines the shield/item, right? I will make the random chance and you do the configuration that suits your taste. I will make array of items for the winner and you put the item on it. Also give me more idea regarding the improvement pf the script you wanted to copy, if you want to add features or something state it. I forgot when will the NPC gives prize? When only the item breaks or? Every successful refine?
  4. I know a simple one. set .@simple$, "L:I:L"; switch ( select( .@simple$ ) ) { case 1: break; case 2: break; case 3: break; }
  5. So you wanted them to have these 4 items first : Nile Rose,Bunch Of Carnation,2nd Aniversary Hat,Vidar's Boots. Before giving them a named sleipnier? Change all of This: (Vidar's Boots ID) (2nd Aniversary Hat ID) (Bunch Of Carnation ID) (Nile Rose ID) to their ITEM ID number. Also dont forget to add dialogues to the NPC that he need this four new items before he/she can claim that sleipnier. Replace this: mes "[ Karina ]"; mes "I will be waiting for you great one."; if(countitem(7345) < 300 || countitem(12028) < 200 || countitem(2423) < 1 || countitem(5074) < 1 || countitem(7444) < 100) goto kikiki; if(countitem(7345) >= 300 || countitem(12028) >= 200 || countitem(2423) >= 1 || countitem(5074) >= 1 || countitem(7444) >= 100) goto killhim; close; With this: mes "I will be waiting for you great one."; if(countitem(7345) < 300 || countitem(12028) < 200 || countitem(2423) < 1 || countitem(5074) < 1 || countitem(7444) < 100 || countitem(Nile Rose ID) < 1 || countitem(Bunch Of Carnation ID) < 1 || countitem(2nd Aniversary Hat ID) < 1 || countitem(Vidar's Boots ID) < 1 ) goto kikiki; if(countitem(7345) >= 300 || countitem(12028) >= 200 || countitem(2423) >= 1 || countitem(5074) >= 1 || countitem(7444) >= 100 || countitem(Nile Rose ID) >= 1 || countitem(Bunch Of Carnation ID) >= 1 || countitem(2nd Aniversary Hat ID) >= 1 || countitem(Vidar's Boots ID) >= 1 ) goto killhim; close; Replace this: killhim: next; mes "[ Karina ]"; mes "Very well done child."; mes "You are very good!"; delitem 7345,300; delitem 12028,22; delitem 2423,1; delitem 5074,1; delitem 7444,100; getitem2 2410,1,1,@ref,0,254,0,getcharid(0)&0xffff,(getcharid(0)>>16)&0xffff; set bry_bry,1; next; With this: killhim: next; mes "[ Karina ]"; mes "Very well done child."; mes "You are very good!"; delitem (Nile Rose ID),1; delitem (Bunch Of Carnation ID),1; delitem (2nd Aniversary Hat ID),1; delitem (Vidar's Boots ID),1; delitem 7345,300; delitem 12028,22; delitem 2423,1; delitem 5074,1; delitem 7444,100; getitem2 2410,1,1,@ref,0,254,0,getcharid(0)&0xffff,(getcharid(0)>>16)&0xffff; set bry_bry,1; next;
  6. give me the whole details of that script, ill try make that one for you.
  7. Sorry for making this harder.. It's also hard for me to update new svn.. Thanks for your efforts.. I forgot to mention, GM can claim rewards without restrictions. Anyways adding more improvement to the script. I think i can finish this less than hour.
  8. Thanks for the close button, and no error found on map-server while redeem the codes more than one. reward_codes : I really dont see any problem inside the script and in my test server, anyways gonna re-write the whole script so that older version can use this. gonna msg u after im done.
  9. Im making new menus and upload the updated after so that close bug wont be happening in older version, i really dont know what causing you the problem of same ip can be claimed. Do you see any mapserver errors?
  10. I am using the lastest svn. #Prob 2: I wonder why close button doesnt appear on you. Im gonna make a special script for you no switch select i think that causing you no close button problem gona change all of that to menu. #Prob 3 && Prob 4: Its working fine on me, i think must fix ur sql first. What error in Map Server appears?
  11. Sorry i forgot to update sql query. heres the new one. DROP TABLE IF EXISTS `reward_codes`; DROP TABLE IF EXISTS `rewardlogs`; CREATE TABLE IF NOT EXISTS `reward_codes` ( `promo` VARCHAR(10) NOT NULL DEFAULT '', `nameid` INT(11) UNSIGNED NOT NULL DEFAULT '0', `item_name` VARCHAR(45) NOT NULL DEFAULT '', `amount` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', `time_created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `limit` INT(11) UNSIGNED NOT NULL DEFAULT '0', `pool` INT(11) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (`promo`) ) ENGINE = MYISAM; CREATE TABLE `rewardlogs` ( `account_id` int(11) unsigned NOT NULL default '0', `last_ip` BINARY( 9 ) NOT NULL, `code` VARCHAR( 10 ) NOT NULL, `redeem_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `claim` INT( 10 ) ) ENGINE = MYISAM; I update the download remove the old one, forgot to paste the updated query, my mistake. Tell me if there is something wrong, on my offline server it working fine.
  12. I did all what you like! And I added more features! I edit the whole script modified by sir patskie, took me almost 12hours LOL! New milestone achievement for me, I can finally manage to mess with SQL-Thingy! Visit the post. http://rathena.org/board/topic/87212-utility-promotional-code/
  13. Special credits to: Sir Patskie, Sir Arrzzae Work best with "ITEM BOUND PRIZE" Because I found my self the script is going to be very useful for everybody, I tweak this script. If this kind of doing in rathena is illegal please delete this post. //////////////////////////////////////////////////////////////////////// //--------------------------------------------------------------------// // PROMOTIONAL CODES // // AUTHOR: LIL TROLL//COLDFIRE // //--------------------------------------------------------------------// // RATHENA SCRIPT // //--------------------------------------------------------------------// // // //--------------------------------------------------------------------// // FEATURES: (Modified Promotional Code by sir Patskie) // // // // #1 5`Degree of Abuse-Protection(+ItemBound = 6) // // - IP,ACCOUNT,COUNTLIMIT,DOUBLECHECK,MIX // // #2 Code can be deleted/detected by gm. // // #3 Friendly User Interface. // // #4 Very easy to configure. // // #5 Code auto delete at certain variable setup(limit pool). // // #6 GM can view codes when claiming. // // #7 GM can set limitation of usage of the codes. // // #8 Automatically delete any codes that set to desirable // // pool limit by gm claimed by players. // // #9 GM can set random code with random item! // // #10 GM toggle(when claiming the code, restriction) included. // //--------------------------------------------------------------------// //////////////////////////////////////////////////////////////////////// ​[spoiler=From topic:]http://rathena.org/board/topic/86986-promotionial-codes-script/ [spoiler=Tweak parts:]I tweaked Promotional Code script: #1 Improve how code can be deleted/detected by gm. #2 Improve Interface(Now more easier to delete config, etc.) #3 Dialogues fix. #4 Knows accurately if a code exist when creating new one. #5 GM can view codes when claiming. See features above for full information regarding the script. [spoiler=I modify the script below:]/* DROP TABLE IF EXISTS `reward_codes`; CREATE TABLE IF NOT EXISTS `reward_codes` ( `code` VARCHAR(10) NOT NULL DEFAULT '', `nameid` INT(11) UNSIGNED NOT NULL DEFAULT '0', `item_name` VARCHAR(45) NOT NULL DEFAULT '', `amount` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0', `time_created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' PRIMARY KEY (`code`) ) ENGINE = MYISAM; DROP TABLE IF EXISTS `rewardlogs`; CREATE TABLE `rewardlogs` ( `account_id` INT( 10 ) NOT NULL, `code` VARCHAR( 10 ) NOT NULL, `redeem_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' ) ENGINE = MyISAM; */ - script promoclaim -1,{ OnInit: bindatcmd "claim",strnpcinfo(3)+"::OnClaim"; bindatcmd "code",strnpcinfo(3)+"::OnEditCode"; end; OnClaim: // if ( getgmlevel() ) end; mes "^FF0000 Enter a new promotional code."; input .@pc$; close2; query_sql "SELECT `nameid`, `amount` FROM `reward_codes` WHERE `code` = '" + escape_sql(.@pc$) + "'", .@item, .@amt; if ( !.@item ) dispbottom "Either invalid code or the code is already claimed by other people"; else { getitem .@item, .@amt; dispbottom "Promotional code successfully redeemed."; query_sql "DELETE FROM `reward_codes` WHERE `code` = '" + escape_sql(.@pc$) + "'"; query_logsql "INSERT INTO `rewardlogs` VALUES ( '" + getcharid(3) + "', '" + escape_sql(.@pc$) + "', NOW() )"; } end; OnEditCode: if ( getgmlevel() < 99 ) end; set .@choice$, "Setup a new promotional code:View existing codes:Delete exisiting codes:Cancel"; setarray .@length, 4,10; // , switch ( select( .@choice$ ) ) { case 1: input .@pcode$; if ( getstrlen( .@pcode$ ) < .@length[0] || getstrlen( .@pcode$ ) > .@length[1] ) { dispbottom "Codes must not be less than " +.@length[0]+ " and must be greater than " +.@length[1]+ "."; end; } mes "You have entered ^FF0000"+.@pcode$+"^000000 as the code."; mes "Are you sure?"; if ( select("Yes:No, thanks") - 1 ) end; query_sql "SELECT `code` FROM `reward_codes` WHERE `code` = '" + escape_sql(.@pcode$) + "'", .@pcode_exists; if ( .@pcode_exists ) { dispbottom "Sorry, that code already exist."; end; } mes "Please set a reward for the players who has entered the code."; input .@reward; next; if ( !.@reward || getitemname(.@reward) == "null" ) { dispbottom "Sorry, that is an invalid item id."; end; } set .@iname$, getitemname(.@reward); mes "Item number ^FF0000"+.@reward+"^000000"; mes "is equivalent to ^FF0000"+.@iname$+"^000000."; mes "Are you sure?"; next; if ( select("Yes:No, thanks") - 1 ) end; mes "How many ^FF0000"+.@iname$+"^000000.?"; input .@amount; next; if ( !.@amount ) { dispbottom "Sorry, that is an invalid amount number."; end; } mes "Are you sure?"; next; if ( select("Yes:No, thanks") - 1 ) end; query_sql "INSERT INTO `reward_codes` VALUES ( '" + escape_sql(.@pcode$) + "', '" + .@reward + "', '" + escape_sql(.@iname$) + "', '" + .@amount + "', NOW() )"; dispbottom "Done creating code!"; break; case 2: set .@nb, query_sql("SELECT code, item_name, amount FROM `reward_codes` ORDER BY time_created DESC LIMIT 20", .@code$, .@nid$, .@amount); if ( !.@nb ) { dispbottom "No exisiting codes."; end; } dispbottom "============================================="; dispbottom "============== EXISITING CODES =============="; dispbottom "============================================="; for(set .@i,0; .@i < .@nb; set .@i,.@i+1) dispbottom ""+.@code$[.@i]+" ( Reward: "+.@amount[.@i]+" "+.@nid$[.@i]+" ) "; dispbottom "============================================="; break; case 3: input .@dcode$; query_sql "SELECT `code` FROM `reward_codes` WHERE `code` = '" + escape_sql(.@dcode$) + "'", .@dcode_exists; if ( !.@dcode_exists ) { dispbottom "Promotional code not found."; end; } mes "Would you like to delete that code?"; next; if ( select("Yes:No, thanks") - 1 ) end; query_sql "DELETE FROM `reward_codes` WHERE `code` = '" + escape_sql(.@dcode$) + "'"; break; case 4: close; break; default: break; } end; } [spoiler=To do:]- NPC Configurations, like only generate code, not others like items,amount,limit. + Code length configuration for random generation.(Done but I wont release it yet.) Figuring out how to autopaste the code from your text box! (If its possible) Figuring out how to claim using "@claim <insertcodehere>" Adding promotional code referal_system. Adding gm can mail codes. Player can main codes also. Adding lots of stuff if i think of new idea. [spoiler=Screenie:]I know I can do better than this but am really tired atm.. [spoiler=Change logs:]v.1: Initial release. v.1.2: Re-write and improve totally the whole script! Added only generate code. v.1.2.1: Uploaded a quick fix, credits to shadowolf and ude for pinpointing some bugs from post #23,#25. v.1.2.2: Improved delete function, change "OnInit" setup vars "$@" to ".", added GM Toggle in setup(claim restriction), improved few dialogues. v.1.2.3: Fix case detection problem on queries. All codes(random,manually generated,claim) will be automatically converted to uppercase. [spoiler=Special notes:][spoiler=The setup:]Just dont forget to fix your settings found on OnInit, at the meantime, I wont release the rand code generator that I used in the script, because it might cause some error on your server, the generator here can only produce 10 strings, and used a basic formula on it. If you wanted to make more than 10strings just add this one "+.@s$[rand(0,35)]+" its very easy! Dont forget to add the sql-thingy! [spoiler=Script is SQL based:]The script variable usage is in SQL(Almost all). Please help me improve this script. If you found bugs or errors please pinpoint it to me so that I can actually fix that fast. Before releasing it to your server, please configure it right and check out what this script does. Please do suggest improvements, additional features, etc. to make the script more diverse and fresh. Also if you knew a way how to do my To Do List, can you help me on that part?(Grab form other post, very very lazy XD.) A little thanks or appreciation of my work will pump-up my motivation to much improve the whole script. Thanks and have fun using the script! ****** I made this script using this svn(http://sourceforge.net/p/rathena/svn/17482/). ****** For those who are using older svn and having an error regarding close button not appearing properly just change where the line part where error appears "end;" to "close;" Smexy update will be finish soon! [spoiler=Update(WIP) Screenie:] Mailing of Code enabled. Referral system: -GM can set pool count of referral. -GM can set prize for every refered new player. -Cannot refer player with same IP/Account. -Changes @claim to @promo: Promo Menu: - Claim Codes - Refered by friend, Claim Reward. - Refer - Referring Menu(will appear when you pick refer over claim). Easy Deletion of all code. Random Auto Generate of code now support 5-15 chars. Added Referral Ladder. P.S. Hope I do have enough time to finish this fast, lots of work to do. New to do list added. Hope someone can help me. promotional_codes_v.1.2.txt promotional_codes_v.1.2.1.txt promotional_codes_v.1.2.2.txt promo_codes_v.1.2.3.txt
  14. Wow thanks so much @sir Simon and @sir Lionhardt! I can finally finish my new idea on World of fishing! Thanks!
  15. Hi guys another question regarding SQL, can anyone help me or teach me how to choose top 3 from a specific column in sql? And later on claim their price by getting it to specific NPC? Am here right now: query_sql "select pool from `system_system` order by pool DESC LIMIT 3",.@placer; Now the next part is? IDK what to do. XD Also I would like to know how to delete a specific values from a table in sql: Like this: I would only like to delete the value not the table. query_sql(DELETE FROM system_system WHERE pool or this? I cant make both work. query_sql "REPLACE INTO `system_system` (`pool`) VALUES ('0')
  16. Bump, updated to Version 1.6! [spoiler=Link:]​http://rathena.org/board/topic/86736-utility-release-world-of-fishing/#entry219249
  17. Sir skit, I do have a suggestion, why not making a oninit variable setup, so that newbie players can configure the script easily?
  18. Wow i dont know there is existing cutins grass released, i used my own cutins, gonna upload my vid later. Thanks for the share, gonna put that up also in the post.
  19. Try applying patch via Tortoise SVN(Automatic Patcher) not manually.
  20. Thanks sir! Im now enlightened I thougt there was a simplier version of select sql.
  21. For added exp feature: Is this correct sir Lionhardt? if(darkabyss==1){set DATime,gettimetick(2)+86400; sc_start SC_EXPBOOST,DATime,100;} if(gettimetick(2) >= DATime){set darkabyss,0; sc_end SC_EXPBOOST; }
×
×
  • Create New...