Jump to content

Pandaaa

Members
  • Content Count

    170
  • Joined

  • Last visited

Everything posted by Pandaaa

  1. Pandaaa

    [Help] @bst

    I can use @bst B>, @bst S> and @bst T> but i cant use @bst B/T> and @bst S/T> how to make @bst B/T> and S/T> work? - script bst -1,{ OnCommand: if ( !getstrlen( .@atcmd_parameters$ ) ) { message strcharinfo(0), "Please, enter a message (usage: @bst <message>)."; end; } if (agitcheck()){ message strcharinfo(0), "Unable to use this command,"; message strcharinfo(0), "War of Emperium is ongoing!"; close; } $@input$ = implode(.@atcmd_parameters$," " ); $@name$ = strcharinfo(0); .@symbol$ = substr( .@atcmd_parameters$, 0,1 ); if ( .@symbol$ != "B>" && .@symbol$ != "S>" && .@symbol$ != "T>" && .@symbol$ != "B/T>" && .@symbol$ != "S/T>" ) { message strcharinfo(0), "Market symbol is needed when using this command."; message strcharinfo(0), "B> : Buying Symbol"; message strcharinfo(0), "S> : Selling Symbol"; message strcharinfo(0), "T> : Trading Symbol"; message strcharinfo(0), "B/T> : Buy & Trade Symbol"; message strcharinfo(0), "S/T> : Sell & Trade Symbol"; end; } if ( bst_delay + 60 > gettimetick(2) ) { message strcharinfo(0), "There is a 60 seconds delay of using this command again"; end; } query_sql ("SELECT `char`.`account_id` FROM `char` JOIN `login` ON `char`.`account_id` = `login`.`account_id` WHERE `char`.`online` = 1", .@account_id); bst_delay = gettimetick(2); // delay while ( .@i < getarraysize(.@account_id) ) { if ( attachrid( .@account_id[.@i] ) ) dispbottom "[ Market ] " + $@name$ + " : " + $@input$,0xFFD700; // display to every character on the server. detachrid; .@i++; } end; OnInit: bindatcmd "bst",strnpcinfo(0)+"::OnCommand", 0, 1; // bind @bst command. end; }
  2. help why i can use parry with dagger and, two hand quicken ( how to make it u can use two hand quicken when you got soul link with one hand sword) skill_require_db.txt 356,0,0,50,0,0,0,3:15,0,0,none,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 //LK_PARRYING#パリイング# made it 3:15 because edited the skills of Star Gladiator to use parrying with Book weapon added this soul link mod for LK skill.c // If linked, knights are able to use parrying with one handed swords (type 2) if( require.weapon && !pc_check_weapontype(sd,require.weapon) && ( skill_id == LK_PARRYING && !sd->sc.data[SC_SOULLINK] && !pc_check_weapontype(sd,2) )) { clif->skill_fail(sd,skill_id,USESKILL_FAIL_THIS_WEAPON,0); return 0; } pc.c // If linked, knights are able to use parrying with one handed swords (type 2) PARRY if( scw_list[i] == SC_PARRYING && sd->sc.data[SC_SOULLINK] && sd->sc.data[SC_SOULLINK]->val2 == SL_KNIGHT && (!pc_check_weapontype(sd,skill->get_weapontype(status->sc2skill(scw_list[i]))) && !pc_check_weapontype(sd,2))) { status_change_end(&sd->bl, scw_list[i], INVALID_TIMER); continue; // We don't want to fall under the next check } well the parry works with 1 hand if get soul linked but i can use parry with dagger and without soul link buff
  3. anyone can update this? i tried the codes and gives error added this lines to status.c /** * SOUL LINK MOD **/ if( sc && sc->data[SC_SOULLINK] && (sc->data[SC_SOULLINK]->val2 == SL_SAGE || sc->data[SC_SOULLINK]->val2 == SL_WIZARD )) vit += ((TBL_PC*)bl)->status.int_ / 5; if( sc && sc->data[SC_SOULLINK] && (sc->data[SC_SOULLINK]->val2 == SL_SAGE || sc->data[SC_SOULLINK]->val2 == SL_WIZARD )) maxhp += ((TBL_PC*)bl)->status.base_level * 200; if( sc && sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_STAR ) flee2 += 10; if( sc && sc->data[SC_SOULLINK] && sc->data[SC_SOULLINK]->val2 == SL_STAR ) { sd->right_weapon.addrace[RC_BOSS] += 100; sd->left_weapon.addrace[RC_BOSS] += 100; sd->right_weapon.addele[ELE_HOLY] += 100; sd->left_weapon.addele[ELE_HOLY] += 100; } gives me this error also used this for fcp strip bypass modification. anyone can update it? http://herc.ws/board/files/download/27-forcibly-strip/FCP bypass
  4. tried this dude, next i got this error after building the koe.c Warning 1 warning C4013: 'addHookPost' undefined; assuming extern returning int Error 2 error LNK2019: unresolved external symbol _addHookPost referenced in function _plugin_init Error 3 error LNK1120: 1 unresolved externals
  5. Pandaaa

    Devil Square

    Heres the script i use.. i want to make after getting through of the mobs at level/round 3.. you can only kill 1 treasure box also the skills will be disabled after killing monster from round 3, so that in round 4 treasure box will appear you cant kill more than 2 (by casting skills ex. Storm Gust or any) you can only kill it by hitting normal attacks.. just once and warps you back to your savepoint.. // Made:By Kirlein (Tyirial Script Concept) // // Devil Square based off the mmorpg Muonline // // Have Fun and feel free to leave suggestions // // Leave This intacted // // + Translated by Stillhard aka Dewa // // + Add times for 24 hours of play // // + Add a little bit infos for newbie users // // Completely rewrite by ~AnnieRuru~ // // + Tested with rAthena 17101 // // http://rathena.org/board/topic/77632-devil-square/ ///////////////////////////////////////////////// prontera,156,185,5 script Devil Square 100,{ mes "[Devil Square Guardian]"; mes "Welcome to the entrance door to ^FF0000Devil Square^000000"; mes "If you failed or die, the door will be closed and you have to wait until it start to open again"; next; if ( select ( "Enter", "Info", "Cancel " ) == 3 ) { mes "[Devil Square Guardian]"; mes "See ya"; close; } else if ( @menu == 2 ) { // Info mes "[Devil Square Guardian]"; mes "There are 3 level monster you'll encounter"; mes "Each level the enemies will grow stronger"; mes "If you succeded to win all 3 level monster, you'll get the opportunity to open 10 Treasure Box with items, equips, and rare cards inside!!"; close; } else if ( .start != 1 ) { // time mes "[Devil Square Guardian]"; mes "Devil Square is now closed"; mes "It'll be open again at:"; mes "00:00 , 02:00 , 04:00 , 06:00"; // display your time here mes "08:00 , 10:00 , 12:00 , 14:00"; mes "16:00 , 18:00 , 20:00 , 22:00"; close; } else if ( baselevel < 70 || zeny < 20000 ) { // requirement mes "[Devil Square Guardian]"; mes "Minimum base level to enter is 70"; mes "The registration fee is 20,000z"; close; } else if ( .register_num >= .register_limit ) { // room FULL mes "[Devil Square Guardian]"; mes "I'm sorry but the Devil Square is FULL"; mes "Maximum users to enter is "+ .register_limit +" players"; close; } zeny = zeny - 20000; announce strcharinfo(0)+" has entered the Devil Square", bc_npc; percentheal 100,100; warp "ordeal_1-1",183,182; .register_aid[ .register_num ] = getcharid(3); .register_num++; end; OnInit: .register_limit = 10; // maximum amount of players can play in this event .ann_survive = 30000; // the rate at which announce the players that still survive in devil square, in mili-seconds bindatcmd "devilsquare", strnpcinfo(0)+"::Onatcmd", 99,100; end; Onatcmd: if ( compare( .@atcmd_parameters$, "on" ) || compare( .@atcmd_parameters$, "start" ) ) { if ( .start ) dispbottom "Devil Square Event already started."; else goto L_Start; } else if ( compare( .@atcmd_parameters$, "off" ) || compare( .@atcmd_parameters$, "end" ) ) { if ( !.start ) dispbottom "Devil Square Event not yet start."; else goto L_End; } else if ( !.start ) { dispbottom "Devil Square Event is currently not running."; dispbottom "Use "+ .@atcmd_command$ +" on | start to start the event."; dispbottom "Use "+ .@atcmd_command$ +" off | end to end this event"; } else if ( .start == 1 ) dispbottom "Devil Square Event is currently accepting participations."; else dispbottom "Devil Square Event is currently running. Currently on Round "+ .round +" with "+ .mob +" mobs left."; end; L_Start: OnClock0000: // yeah I know about OnMinute ... it just that more people knows better using OnClock OnClock0200: OnClock0400: OnClock0600: OnClock0800: OnClock1000: OnClock1200: OnClock1400: OnClock1600: OnClock1800: OnClock2000: OnClock2200: if ( .start ) end; .start = 1; disablenpc "Exit#DS"; mapannounce "ordeal_1-1","Devil Square is now closed", bc_map; getmapxy .@map$, .@x, .@y, 1; mapwarp "ordeal_1-1", .@map$, .@x, .@y; killmonsterall "ordeal_1-1"; announce "Devil Square is OPENED NOW!! 5 Minutes until it starts..!!", bc_all; sleep 60000; announce "Devil Square will begin in 4 minutes..!!", bc_all; sleep 60000; announce "Devil Square will begin in 3 minutes..!!", bc_all; sleep 60000; announce "Devil Square will begin in 2 minutes..!!", bc_all; sleep 60000; announce "Devil Square will begin in 1 minutes..!!", bc_all; sleep 60000; announce "Devil Square is STARTED NOW !!", bc_all; if ( !.register_num ) goto L_End; .start = 2; donpcevent strnpcinfo(0)+"::OnSurvive"; .round = 1; .mob = 75; areamonster "ordeal_1-1",183,182,246,244,"[DS] SOLDIER SKELETON",1028,10,strnpcinfo(0)+"::Ondevildead"; areamonster "ordeal_1-1",183,182,246,244,"[DS] ORC ARCHER",1189,15,strnpcinfo(0)+"::Ondevildead"; areamonster "ordeal_1-1",183,182,246,244,"[DS] SANDMAN",1165,10,strnpcinfo(0)+"::Ondevildead"; areamonster "ordeal_1-1",183,182,246,244,"[DS] ARCHER SKELETON",1016,15,strnpcinfo(0)+"::Ondevildead"; areamonster "ordeal_1-1",183,182,246,244,"[DS] MINOROUS",1149,15,strnpcinfo(0)+"::Ondevildead"; areamonster "ordeal_1-1",183,182,246,244,"[DS] REQUIEM",1164,10,strnpcinfo(0)+"::Ondevildead"; end; Ondevildead: .mob--; if ( .mob == 25 || .mob == 5 ) announce "Devil Square : "+ .mob +" mobs to enter the 2nd round", bc_map; else if ( !.mob ) { announce "Devil Square will enter to 2nd round", bc_map; goto Ondevil2; } end; Ondevil2: .round = 2; .mob = 70; areamonster "ordeal_1-1",183,182,246,244,"[DS] GARGOYLE",1253,15,strnpcinfo(0)+"::Ondevildead2"; areamonster "ordeal_1-1",183,182,246,244,"[DS] ALARM",1193,10,strnpcinfo(0)+"::Ondevildead2"; areamonster "ordeal_1-1",183,182,246,244,"[DS] HIGH ORC",1213,10,strnpcinfo(0)+"::Ondevildead2"; areamonster "ordeal_1-1",183,182,246,244,"[DS] INJUSTICE",1257,10,strnpcinfo(0)+"::Ondevildead2"; areamonster "ordeal_1-1",183,182,246,244,"[DS] MIMIC",1191,15,strnpcinfo(0)+"::Ondevildead2"; areamonster "ordeal_1-1",183,182,246,244,"[DS] WRAITH",1192,10,strnpcinfo(0)+"::Ondevildead2"; end; Ondevildead2: .mob--; if ( .mob == 25 || .mob == 5 ) announce "Devil Square : "+ .mob +" mobs left to enter the 3rd round", bc_map; else if ( !.mob ) { announce "Devil Square will enter to 3rd round", bc_map; goto Ondevil3; } end; Ondevil3: .round = 3; .mob = 58; areamonster "ordeal_1-1",183,182,246,244,"[DS] ANOLIAN",1206,15,strnpcinfo(0)+"::Ondevildead3"; areamonster "ordeal_1-1",183,182,246,244,"[DS] WANDERER",1208,15,strnpcinfo(0)+"::Ondevildead3"; areamonster "ordeal_1-1",183,182,246,244,"[DS] DEVIRUCHI",1109,10,strnpcinfo(0)+"::Ondevildead3"; areamonster "ordeal_1-1",183,182,246,244,"[DS] JOKER",1131,15,strnpcinfo(0)+"::Ondevildead3"; areamonster "ordeal_1-1",183,182,246,244,"[DS] MOONLIGHT",1150,2,strnpcinfo(0)+"::Ondevildead3"; areamonster "ordeal_1-1",183,182,246,244,"[DS] DARK ILLUSION",1302,1,strnpcinfo(0)+"::Ondevildead3"; end; Ondevildead3: .mob--; if ( .mob == 25 || .mob == 5 ) announce "Devil Square : "+ .mob +" mobs left to VICTORY", bc_map; else if ( !.mob ) { announce "Devil Square : CONGRATULATION - 10 Treasure Boxs will be yours now", bc_map; goto Ondevil4; } end; Ondevil4: .round = 4; .mob = 10; monster "ordeal_1-1",231,250,"Treasure Box",1324,1,strnpcinfo(0)+"::Onboxdead"; monster "ordeal_1-1",234,247,"Treasure Box",1328,1,strnpcinfo(0)+"::Onboxdead"; monster "ordeal_1-1",237,244,"Treasure Box",1332,1,strnpcinfo(0)+"::Onboxdead"; monster "ordeal_1-1",240,241,"Treasure Box",1336,1,strnpcinfo(0)+"::Onboxdead"; monster "ordeal_1-1",243,238,"Treasure Box",1340,1,strnpcinfo(0)+"::Onboxdead"; monster "ordeal_1-1",246,235,"Treasure Box",1344,1,strnpcinfo(0)+"::Onboxdead"; monster "ordeal_1-1",249,232,"Treasure Box",1348,1,strnpcinfo(0)+"::Onboxdead"; monster "ordeal_1-1",252,229,"Treasure Box",1352,1,strnpcinfo(0)+"::Onboxdead"; monster "ordeal_1-1",249,241,"Treasure Box",1356,1,strnpcinfo(0)+"::Onboxdead"; monster "ordeal_1-1",240,249,"Treasure Box",1360,1,strnpcinfo(0)+"::Onboxdead"; end; Onboxdead: .mob--; announce "Devil Square : "+ strcharinfo(0) +" has opened the treasure box at Devil Square", bc_all; if ( !.mob ) goto L_End; end; L_End: killmonsterall "ordeal_1-1"; enablenpc "Exit#DS"; deletearray .register_aid; .start = .round = .mob = .register_num = 0; end; OnPCDieEvent: OnPCLogoutEvent: if ( .start && strcharinfo(3) == "ordeal_1-1" ) { while ( .register_aid[.@i] != getcharid(3) && .@i < .register_num ) .@i++; deletearray .register_aid[.@i], 1; .register_num--; if ( !.register_num ) { announce "All players failed to survive at Devil Square", bc_all; killmonsterall "ordeal_1-1"; goto L_End; } } end; OnSurvive: while ( .start == 2 ) { mapannounce "ordeal_1-1", .register_num +" players is still survive at Devil Square", bc_map; sleep .ann_survive; } end; } ordeal_1-1,246,245,7 script Exit#DS 51,{ mes "[Exit]"; mes "See ya"; next; warp "SavePoint", 0,0 ; close; } ordeal_1-1 mapflag nowarp ordeal_1-1 mapflag nowarpto ordeal_1-1 mapflag noteleport ordeal_1-1 mapflag nosave SavePoint ordeal_1-1 mapflag nomemo ordeal_1-1 mapflag nobranch ordeal_1-1 mapflag nopenalty ordeal_1-1 mapflag noicewall
  6. every time i kill a mob, my server map loads like hell (gives me delay) here is the message thing shows at my map-server, evertime i kill 1 monster [SQL]: DB error - Table 'ragnarok.picklog' doesn't exist [Debug]: at c:\users\wraaap\desktop\herculessvn5-20-16\testserver files\src\map\log.c:169 - INSERT DELAYED INTO `picklog` (`time`, `char_id`, `type`, `nameid`, `amount`, `refine`, `card0`, `card1`, `card2`, `card3`, `map`, `unique_id`) VALUES (NOW(), '1356', 'M', '608', '-1', '0', '0', '0', '0', '0', 'phtownall', '0') [Info]: Character 'Ragnarokkkk' logged off. currently i added a devil square npc then kill all the mobs, then after casting skills.. the map loads so long like 5~7secs then kills the mobs ==
  7. anyone has the working diff/patch of this koe? tried to add the plugin gets error? also some links are broken help i got this error after building the koe.c Warning 1 warning C4013: 'addHookPost' undefined; assuming extern returning int Error 2 error LNK2019: unresolved external symbol _addHookPost referenced in function _plugin_init Error 3 error LNK1120: 1 unresolved externals
  8. hello, is it possible to make this market clone can only be use in a specific area? to prevent abuse using in different areas? i know there is a town use only with this command but is it possible like you can only use @market at prontera <x>,<y> ( if area already take switch to other coordinate)
  9. Pandaaa

    @security

    heres my plugin.conf from conf/ //==================================================== //= _ _ _ //= | | | | | | //= | |_| | ___ _ __ ___ _ _| | ___ ___ //= | _ |/ _ \ '__/ __| | | | |/ _ \/ __| //= | | | | __/ | | (__| |_| | | __/\__ \ //= \_| |_/\___|_| \___|\__,_|_|\___||___/ //= //= http://herc.ws/board/ //==================================================== //== Topic Discussion ================================ //== http://herc.ws/board/topic/549-introducing-hercules-plugin-manager/ //==================================================== //== Description ===================================== //The plugin system allows you to create customized scripts //outside of the source. These scripts won't conflict with any //future source updates - think of it as a /conf/import/ for the source. //==================================================== /* --------------- Format --------------- After you have listed your plugin(s) in "quotations", you need to put in a comma, to separate the plugins. ----------------------------------------- plugins_list: [ "example", "other", ] ----------------------------------------- Please note that your scripts need to be saved in the .c (source code) extension and placed in the /src/plugin/ folder. ----------------------------------------- */ plugins_list: [ /* Enable HPMHooking when plugins in use rely on Hooking */ //"HPMHooking", //"db2sql", //"sample", //"other", "security", ] already added "security", is that the thing to enable HPMHooking plugins? sorry newbie to adding Plugins. ---------------- EDIT ----------------------- Oh, got it //"HPMHooking", to "HPMHooking", right? Working now thanks alot!!
  10. Pandaaa

    @security

    got the security mod here https://github.com/dastgir/HPM-Plugins/tree/master/src/plugins following the steps here http://herc.ws/wiki/Building_HPM_Plugin_for_MSVC after compiling and editing the conf/plugins.conf then running the server it gives me error here is it. [Map][16:9] [Error]: HPM:AddHook Fail! 'Security' tried to hook to 'pc->dropitem' but HPMHooking is disabled! [Map][16:9] [Error]: HPM:AddHook Fail! 'Security' tried to hook to 'trade->request' but HPMHooking is disabled! [Map][16:9] [Error]: HPM:AddHook Fail! 'Security' tried to hook to 'gstorage->open' but HPMHooking is disabled! [Map][16:9] [Error]: HPM:AddHook Fail! 'Security' tried to hook to 'gstorage->additem' but HPMHooking is disabled! [Map][16:9] [Error]: HPM:AddHook Fail! 'Security' tried to hook to 'gstorage->get' but HPMHooking is disabled! [Map][16:9] [Error]: HPM:AddHook Fail! 'Security' tried to hook to 'gstorage->gettocart' but HPMHooking is disabled! [Map][16:9] [Error]: HPM:AddHook Fail! 'Security' tried to hook to 'pc->delitem' but HPMHooking is disabled! [Map][16:9] [Error]: HPM:AddHook Fail! 'Security' tried to hook to 'npc->selllist' but HPMHooking is disabled! [Map][16:9] [Error]: HPM:AddHook Fail! 'Security' tried to hook to 'npc->buylist' but HPMHooking is disabled! [Map][16:9] [Error]: HPM:AddHook Fail! 'Security' tried to hook to 'clif->openvendingreq' but HPMHooking is disabled! [Map][16:9] [Error]: HPM:AddHook Fail! 'Security' tried to hook to 'guild->invite' but HPMHooking is disabled! [Map][16:9] [Error]: HPM:AddHook Fail! 'Security' tried to hook to 'guild->leave' but HPMHooking is disabled
  11. hmm, warps you to a gm house yeah the character sents a @request i dont know if it will be abusable how? player will just automatically warp in a GM House(Any map you want), pubs the message and waits for his/her turn nothing more... btw, is this kind of command possible? xD i just thought it will be easier to notice, than sending only a chat.
  12. Instead of making @request send a messages only to GMs. I wanted to change like if you type @request command with your message. ex. "@request help me character stuck." It will warp to a GM support/report map and automatically pubs ("help me character stuck.") 'your message/concern'
  13. this thing only makes the cell unvendable, is there a script the will enable to use vend in a specific cell.. added mapflag to avoid vends in different area in prontera..
  14. atcommand.c ACMD(bst) { if ( !message || !*message ) { clif->message(fd, "Please, enter a message (usage: @bst <message>)."); return false; } if ( sd->bst_delay + 60 > (int)time(NULL) ) { clif->message(fd, "There is a 60 seconds delay of using this command again"); return false; } sprintf( atcmd_output, "[Market] %s : %s", sd->status.name, message ); intif->broadcast2( atcmd_output, (int)strlen(atcmd_output)+1, strtol("0x9999FF", NULL, 0), 0x190, 12, 0, 0 ); sd->bst_delay = (int)time(NULL); return true; }
  15. how can i enable to use vending at the line prontera 191,174 until prontera 213,174 only?
  16. heres the script i use prontera,184,176,4 script Vending Area 2_VENDING_MACHINE1,{ OnWhisperGlobal: OnInit: setcell "prontera",191,177,213,177,cell_novending,1; // Line 1 setcell "prontera",191,174,213,174,cell_novending,1; // Line 2 setcell "prontera",191,171,213,171,cell_novending,1; // Line 3 setcell "prontera",191,173,213,173,cell_novending,1; // Line 4 setcell "prontera",191,168,213,168,cell_novending,1; // Line 5 setcell "prontera",191,165,213,165,cell_novending,1; // Line 6 } prontera mapflag novending prontera mapflag nobranch can anyone help how to bypass the mapflag novending into a specific line of vending? is that possible? i found this script @ rathena forums^
  17. did that too but same.. well i downloaded the latest kRO from NickyZai how come barricade is not on grf.. let me try using other mob id/sprite Edit: oh i just tried another sprite it seem my client has the error, tried summoning poring and put the cursor on it then error Fixed now...
  18. hello, what is the problem with my script everytime i put my cursor to the Barricade it gives me error.. heres the script im using got from rathena ( I'm looking for a dummy/punching bag mob npc that will resurrect everytime it comes to 0 HP.. @ the same position ) - script Punching Bag -1,{ OnInit: setmapflag( "payon",mf_monster_noteleport ); OnDummyKill: monster "prontera",187,209,"Punching Bag",1905,1,"Punching Bag::OnDummyKill"; end; OnPCAttackEvent: if ( !@test_punch ) end; @dps_damage += @damage; end; }
  19. Here's the script i used but i seems gets me error help please ^^ //===== rAthena Script ======================================= //= Euphy's Quest Shop //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.6b //===== Compatible With: ===================================== //= rAthena SVN r16862+ //===== Description: ========================================= //= A dynamic quest shop based on Lunar's, with easier config. //= Includes support for multiple shops & cashpoints. //= Item Preview script by ToastOfDoom. //===== Additional Comments: ================================= //= 1.0 Initial script. //= 1.2 Added category support. //= 1.3 More options and fixes. //= 1.4 Added debug settings. //= 1.5 Replaced categories with shop IDs. //= 1.6 Added support for purchasing stackables. //= 1.6a Added support for previewing costumes and robes. //= 1.6b Added 'disable_items' command. //============================================================ // Shop NPCs -- supplying no argument displays entire menu. // callfunc "qshop"{,<shop ID>{,<shop ID>{,...}}}; //============================================================ prt_in,38,107,3 script Quest Shop#1 4_F_KHELLY{ callfunc "qshop"; } // Script Core //============================================================ - script quest_shop -1,{ function Add; function Chk; function Slot; function A_An; OnInit: freeloop(1); // ----------------------------------------------------------- // Basic shop settings. // ----------------------------------------------------------- set .Announce,1; // Announce quest completion? (1: yes / 0: no) set .ShowSlot,1; // Show item slots? (2: all equipment / 1: if slots > 0 / 0: never) set .ShowID,0; // Show item IDs? (1: yes / 0: no) set .ShowZeny,0; // Show Zeny cost, if any? (1: yes / 0: no) set .MaxStack,100; // Max number of quest items purchased at one time. // ----------------------------------------------------------- // Points variable -- optional quest requirement. // setarray .Points$[0],"<variable name>","<display name>"; // ----------------------------------------------------------- setarray .Points$[0],"#CASHPOINTS","Cash Points"; // ----------------------------------------------------------- // Shop IDs -- to add shops, copy dummy data at bottom of file. // setarray .Shops$[1],"<Shop 1>","<Shop 2>"{,...}; // ----------------------------------------------------------- setarray .Shops$[1],"Headgears","Weapons","Other"; // ----------------------------------------------------------- // Quest items -- do NOT use a reward item more than once! // Add(<shop ID>,<reward ID>,<reward amount>, // <Zeny cost>,<point cost>, // <required item ID>,<required item amount>{,...}); // ----------------------------------------------------------- Add(1,5022,1,0,0,7086,1,969,10,999,40,1003,50,984,2); Add(1,5032,1,0,0,1059,250,2221,1,2227,1,7063,600); Add(1,5027,1,0,0,2252,1,1036,400,7001,50,4052,1); Add(1,5045,1,0,0,2252,1,1054,450,943,1200); Add(2,1224,1,0,0,7297,30,969,10,999,50,714,10); Add(2,1225,1,0,0,7292,30,969,10,999,50,714,10); Add(3,531,1,3,0,512,1,713,1); Add(3,532,1,3,0,513,1,713,1); Add(3,533,1,3,0,514,1,713,1); Add(3,534,1,3,0,515,1,713,1); // ----------------------------------------------------------- freeloop(0); set .menu$,""; for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1) { set .menu$, .menu$+.Shops$[.@i]+":"; npcshopdelitem "qshop"+.@i,909; } end; OnMenu: set .@size, getarraysize(@i); if (!.@size) set .@i, select(.menu$); else if (.@size == 1) set .@i, @i[0]; else { for(set .@j,0; .@j<.@size; set .@j,.@j+1) set .@menu$, .@menu$+.Shops$[@i[.@j]]+":"; set .@i, @i[select(.@menu$)-1]; } deletearray @i[0],getarraysize(@i); if (.Shops$[.@i] == "") { message strcharinfo(0),"An error has occurred."; end; } dispbottom "Select one item at a time."; callshop "qshop"+.@i,1; npcshopattach "qshop"+.@i; end; OnBuyItem: // .@q[] : RewardID, BoughtAmt, RewardAmt, BaseAmt, ReqZeny, ReqPts, { ReqItem, ReqAmt, ... } setarray .@q[0],@bought_nameid[0],((@bought_quantity[0] > .MaxStack)?.MaxStack:@bought_quantity[0]); copyarray .@q[3],getd(".q_"+.@q[0]+"[0]"),getarraysize(getd(".q_"+.@q[0])); set .@q[2],.@q[1]*.@q[3]; if (!.@q[2] || .@q[2] > 30000) { message strcharinfo(0),"You can't purchase that many "+getitemname(.@q[0])+"."; end; } mes "[Quest Shop]"; mes "Reward: ^0055FF"+((.@q[2] > 1)?.@q[2]+"x ":"")+Slot(.@q[0])+"^000000"; mes "Requirements:"; disable_items; if (.@q[4]) mes " > "+Chk(Zeny,.@q[4]*.@q[1])+(.@q[4]*.@q[1])+" Zeny^000000"; if (.@q[5]) mes " > "+Chk(getd(.Points$[0]),.@q[5]*.@q[1])+(.@q[5]*.@q[1])+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+(.@q[5]*.@q[1])+")^000000"; if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2) mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1]*.@q[1])+((.ShowID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+(.@q[.@i+1]*.@q[1])+")^000000"; next; setarray @qe[1], getiteminfo(.@q[0],5), getiteminfo(.@q[0],11); if (@qe[2] > 0 && ((@qe[1] & 1) || (@qe[1] & 256) || (@qe[1] & 512) || (@qe[1] & 1024) || (@qe[1] & 2048) || (@qe[1] & 4096) || (@qe[1] & 4) || (@qe[1] & 8192))) set .@preview,1; addtimer 1000, strnpcinfo(0)+"::OnEnd"; while(1) { switch(select(" ~ Purchase ^0055FF"+getitemname(.@q[0])+"^000000:"+((.@preview && !@qe[7])?" ~ Preview...":"")+": ~ ^777777Cancel^000000")) { case 1: if (@qe[0]) { mes "[Quest Shop]"; mes "You're missing one or more quest requirements."; close; } if (!checkweight(.@q[0],.@q[2])) { mes "[Quest Shop]"; mes "^FF0000You need "+(((.@q[2]*getiteminfo(.@q[0],6))+Weight-MaxWeight)/10)+" additional weight capacity to complete this trade.^000000"; close; } if (.@q[4]) set Zeny, Zeny-(.@q[4]*.@q[1]); if (.@q[5]) setd .Points$[0], getd(.Points$[0])-(.@q[5]*.@q[1]); if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2) delitem .@q[.@i],.@q[.@i+1]*.@q[1]; getitem .@q[0],.@q[2]; if (.Announce) announce strcharinfo(0)+" has created "+((.@q[2] > 1)?.@q[2]+"x "+getitemname(.@q[0]):A_An(getitemname(.@q[0])))+"!",0; specialeffect2 EF_FLOWERLEAF; close; case 2: setarray @qe[3], getlook(LOOK_HEAD_BOTTOM), getlook(LOOK_HEAD_TOP), getlook(LOOK_HEAD_MID), getlook(LOOK_ROBE), 1; if ((@qe[1] & 1) || (@qe[1] & 4096)) changelook LOOK_HEAD_BOTTOM, @qe[2]; else if ((@qe[1] & 256) || (@qe[1] & 1024)) changelook LOOK_HEAD_TOP, @qe[2]; else if ((@qe[1] & 512) || (@qe[1] & 2048)) changelook LOOK_HEAD_MID, @qe[2]; else if ((@qe[1] & 4) || (@qe[1] & 8192)) changelook LOOK_ROBE, @qe[2]; break; case 3: close; } } OnEnd: if (@qe[7]) { changelook LOOK_HEAD_BOTTOM, @qe[3]; changelook LOOK_HEAD_TOP, @qe[4]; changelook LOOK_HEAD_MID, @qe[5]; changelook LOOK_ROBE, @qe[6]; } deletearray @qe[0],8; end; function Add { if (getitemname(getarg(1)) == "null") { debugmes "Quest reward #"+getarg(1)+" invalid (skipped)."; return; } setarray .@j[0],getarg(2),getarg(3),getarg(4); for(set .@i,5; .@i<getargcount(); set .@i,.@i+2) { if (getitemname(getarg(.@i)) == "null") { debugmes "Quest requirement #"+getarg(.@i)+" invalid (skipped)."; return; } else setarray .@j[.@i-2],getarg(.@i),getarg(.@i+1); } copyarray getd(".q_"+getarg(1)+"[0]"),.@j[0],getarraysize(.@j); npcshopadditem "qshop"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0); return; } function Chk { if (getarg(0) < getarg(1)) { set @qe[0],1; return "^FF0000"; } else return "^00FF00"; } function Slot { set .@s$,getitemname(getarg(0)); switch(.ShowSlot) { case 1: if (!getitemslots(getarg(0))) return .@s$; case 2: if (getiteminfo(getarg(0),2) == 4 || getiteminfo(getarg(0),2) == 5) return .@s$+" ["+getitemslots(getarg(0))+"]"; default: return .@s$; } } function A_An { setarray .@A$[0],"a","e","i","o","u"; set .@B$, "_"+getarg(0); for(set .@i,0; .@i<5; set .@i,.@i+1) if (compare(.@B$,"_"+.@A$[.@i])) return "an "+getarg(0); return "a "+getarg(0); } } function script qshop { deletearray @i[0],getarraysize(@i); for(set .@i,0; .@i<getargcount(); set .@i,.@i+1) set @i[.@i],getarg(.@i); doevent "quest_shop::OnMenu"; end; } // Dummy shop data -- copy as needed. //============================================================ - shop qshop1 -1,4_F_KHELLY:-1 - shop qshop2 -1,4_F_KHELLY:-1 - shop qshop3 -1,4_F_KHELLY:-1 - shop qshop4 -1,4_F_KHELLY:-1 - shop qshop5 -1,4_F_KHELLY:-1 this is the error i get
  20. The lub file i edited is at RO/System/ still give me unknown items and also i intend to create an error line in data/luafiles514/lua files/datainfo/accname&accessoryid then launching the client the client still works..
  21. well i diff it using nemo with a read data folder first.. so it will read the luafiles at the data folder right? but how come i get apple/unknown items (I already edited the System/itemInfo.lub) with their right view id
  22. but still reads the lub version at data/luafiles514\lua files?
  23. 2014 clients read System/itemInfo.lub How about the accname.lua and accessoryid.lua from the lua files inside the data folder
  24. currently adding a customs items, using a 2014-02-05 Client (its fine), edited the Data/luafiles512/lua files/datainfo files for adding custom items with each IDs and also edited the idnum2item(display/resname)table.txt and the idnum2itemdesctable.txt for the items descriptions and name then tried to get the item inside the game.. it gives me different item (apple)
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.