Jump to content

AnnieRuru

Script Developers
  • Content Count

    1677
  • Joined

  • Last visited

  • Days Won

    245

Everything posted by AnnieRuru

  1. 1. that error means, if you have IF condition, using a label prontera,158,185,5 script jdshfjsdfh 1_F_MARIA,{ if ( Onaaa ) end; Onaaa: } [Warning]: Unexpected type for argument 1. Expected number. [Debug]: Data: label pos=33 [Debug]: Function: __jump_zero [Debug]: Source (NPC): jdshfjsdfh at prontera (158,185) 2. can be simplify using array prontera,158,185,5 script jdshfjsdfh 1_F_MARIA,{ for ( .@i = 0; .@i < .mapflagsize; ++.@i ) { if ( getmapflag( strcharinfo(PC_MAP), .mapflag[.@i] ) ) dispbottom sprintf( _$( " Yes %s " ), .mapflag$[.@i] ), C_SPRINGGREEN; else dispbottom sprintf( _$( " Not %s " ), .mapflag$[.@i] ), C_RED; } end; OnInit: setarray .mapflag$, "mf_nomemo", "mf_noteleport", "mf_nosave", "mf_nobranch", "mf_nopenalty", "mf_nozenypenalty", "mf_pvp", "mf_pvp_noparty", "mf_pvp_noguild", "mf_gvg", "mf_gvg_noparty", "mf_notrade", "mf_noskill", "mf_nowarp", "mf_partylock", "mf_noicewall", "mf_snow", "mf_fog", "mf_sakura", "mf_leaves", "mf_clouds", "mf_clouds2", "mf_fireworks", "mf_gvg_castle", "mf_gvg_dungeon", "mf_nightenabled", "mf_nobaseexp", "mf_nojobexp", "mf_nomobloot", "mf_nomvploot", "mf_noreturn", "mf_nowarpto", "mf_nightmaredrop", "mf_nocommand", "mf_nodrop", "mf_novending", "mf_loadevent", "mf_nochat", "mf_noexppenalty", "mf_guildlock", "mf_town", "mf_autotrade", "mf_allowks", "mf_monster_noteleport", "mf_pvp_nocalcrank", "mf_battleground", "mf_reset", "mf_notomb", "mf_nocashshop", "mf_noautoloot", "mf_noviewid", "mf_pairship_startable", "mf_pairship_endable"; setarray .mapflag, mf_nomemo, mf_noteleport, mf_nosave, mf_nobranch, mf_nopenalty, mf_nozenypenalty, mf_pvp, mf_pvp_noparty, mf_pvp_noguild, mf_gvg, mf_gvg_noparty, mf_notrade, mf_noskill, mf_nowarp, mf_partylock, mf_noicewall, mf_snow, mf_fog, mf_sakura, mf_leaves, mf_clouds, mf_clouds2, mf_fireworks, mf_gvg_castle, mf_gvg_dungeon, mf_nightenabled, mf_nobaseexp, mf_nojobexp, mf_nomobloot, mf_nomvploot, mf_noreturn, mf_nowarpto, mf_nightmaredrop, mf_nocommand, mf_nodrop, mf_novending, mf_loadevent, mf_nochat, mf_noexppenalty, mf_guildlock, mf_town, mf_autotrade, mf_allowks, mf_monster_noteleport, mf_pvp_nocalcrank, mf_battleground, mf_reset, mf_notomb, mf_nocashshop, mf_noautoloot, mf_noviewid, mf_pairship_startable, mf_pairship_endable; .mapflagsize = 53; end; } PS: is there a way to convert these data .... that .mapflag$ into .mapflag from constant into string ? when I tried *data_to_string it shows the loop array name instead of actual data
  2. if you mean like event script, that waitingroom can be open/close, that warp player to event map when its open prontera,158,185,5 script jdshfjsdfh 1_F_MARIA,{ if ( .start ) mes "The event is OPEN"; else mes "The event is CLOSED"; close; OnInit: bindatcmd "asdf", strnpcinfo(NPC_NAME)+"::Onaaa"; waitingroom "Event", 0; end; Onaaa: .start ^= 1; delwaitingroom strnpcinfo(NPC_NAME); if ( .start ) waitingroom "Event", 2, strnpcinfo(NPC_NAME)+"::Onstart", 1; else waitingroom "Event", 0; end; Onstart: getwaitingroomstate 0; unitwarp $@chatmembers[0], "guild_vs2", 49,49; end; } however if it is for player, I have absolutely no idea what your point is ... PS: I think ... like I have to fix my OnPCUseSKillEvent ....
  3. Q1, no, just insert that part into the script demonstrate on your 1st post Q2, my bindatcmd is just a debugging command, you can remove it
  4. https://github.com/HerculesWS/Hercules/wiki/Clientinfo.xml#explanation vietnam is langtype 15 ... I believe
  5. nonono ... KirieZ answer is almost similar to my answer on rathena forum, sometimes we gave overly-complicated answer and members don't understand but yeah, I suggest you should learn this trick sooner or later because one day you might wanna use it can just test my script on the one on rathena board hercules don't have *inarray function script F_MesItemInfo { .@item = getarg(0); .@itemname$ = getitemname(.@item); if (.@itemname$ == "null") .@itemname$ = "Unknown Item"; if (PACKETVER >= 20150729) return sprintf("<ITEM>%s<INFO>%d</INFO></ITEM>", .@itemname$, .@item); else if (PACKETVER >= 20130130) return sprintf("<ITEMLINK>%s<INFO>%d</INFO></ITEMLINK>", .@itemname$, .@item); else return .@itemname$; } prontera,158,185,5 script jdshfjsdfh 1_F_MARIA,{ getinventorylist; for ( .@i = 0; .@i < @inventorylist_count; ++.@i ) { if ( .itemidx[ @inventorylist_id[.@i] ] ) { .@itemid[.@c++] = @inventorylist_id[.@i]; .@menu$ += getitemname( @inventorylist_id[.@i] ) +":"; } } if ( !.@c ) { mes "You don't have any ticket on you"; close; } .@s = select( .@menu$ ) -1; mes "You have selected "+ F_MesItemInfo(.@itemid[.@s]); close; OnInit: setarray .@itemlist[1], 909,910,911,912, 34993,34994,34995,34996; .@size = getarraysize(.@itemlist); for ( .@i = 1; .@i < .@size; ++.@i ) .itemidx[ .@itemlist[.@i] ] = .@i; end; }
  6. https://rathena.org/board/topic/118341-conditions-for-labels-and-inside-menus/?do=findComment&comment=358053 just if-else if-else if-else if-else on every statement
  7. you mean this is an event script, not game ? can you repeat again what is the description of your 'event' script ?
  8. is there some kind of game ... that use this description ? don't really understand whats the difference in reduce damage taken and absorb damage taken ... if absorb 10% damage taken, that would equal to reduce 20% taken isn't it ? btw sorry earlier, it seems bonus bNearAtkDef,`n`; reduce damage taken in value, not percentage if you couldn't find the bonus you want ... https://github.com/HerculesWS/Hercules/blob/stable/doc/item_bonus.md then its probably not there
  9. hmm ... I thought you are using some unique/custom item ID ... but if you are using normal items, then if the player already having ... katana for example, the equip script command might equip the wrong item for the time being, perhaps using getinventorylistidx could solve this potential problem ... until we have those script commands prontera,158,185,5 script asdasdad 1_F_MARIA,{ rentitem Knife, 60; .@renttime = gettimetick(2) + 60; getinventorylistidx; .@inventorysize = getInventorySize(); for ( .@i = 0; .@i < .@inventorysize; ++.@i ) { if ( @inventorylistidx_id[.@i] == Knife && @inventorylistidx_expire[.@i] == .@renttime ) { equipidx .@i; break; } } setequipoption EQI_HAND_R, 1, VAR_STRAMOUNT, 50; end; } well ... that's the problem when we still don't have complete list of script commands ...yet
  10. prontera,155,165,5 script Safari Zone 1_F_MARIA,{ disable_items; .@npcname$ = "[Guardian]"; mes .@npcname$; mesf "Hello %s I am the guardian of the Safari Zone", strcharinfo(PC_NAME); mes "There you can capture Pokemon and if you're lucky, train them to follow you everywhere!"; next; mes .@npcname$; mes "besides to let you in you need a Safari ticket, that you can buy it in Hunting Mission"; next; mes .@npcname$; mes "Do you want to enter the Safari Zone?"; next; if ( select ("Yes","No") == 2 ) { mes .@npcname$; mes "Come back soon"; close; } mes .@npcname$; mes "Let's see if you have the ticket"; next; if ( !countitem(Monster_Ticket) ) { mes "I'm sorry, but you do not have a Safari Ticket, I can not let you pass."; close; } mes .@npcname$; mes "Well, you have the Safari Ticket, you can pass!"; mes "Remember that Safari Zone can only enter for 1 hour and time is running, hurry !"; mes "Ok There you go ... Good Luck!"; close2; if ( !countitem(Monster_Ticket) ) { // counter-check for hacker mes .@npcname$; mes "I'm sorry, but you do not have a Safari Ticket, I can not let you pass."; close; } delitem Monster_Ticket, 1; warp "ordeal_2-2", 243,265; addtimer 10000, strnpcinfo(NPC_NAME)+"::OnTimerLimit1"; // 10 seconds to display message end; OnTimerLimit1: dispbottom "You have 20 seconds left."; addtimer 10000, strnpcinfo(NPC_NAME)+"::OnTimerLimit2"; end; OnTimerLimit2: dispbottom "You have 10 seconds left."; addtimer 10000, strnpcinfo(NPC_NAME)+"::OnTimerLimit3"; end; OnTimerLimit3: warp "Save", 0,0; end; } ordeal_2-2 mapflag nowarpto ordeal_2-2 mapflag nomemo ordeal_2-2 mapflag nosave
  11. https://annieruru.blogspot.com/2019/01/how-to-add-custom-map.html the reason why hercules change the mapcache system because, the default way of running map_cache.bat https://github.com/HerculesWS/Hercules/pull/1552#issuecomment-279596099 1. can generate rubbish the more you run map_cache.bat 2. total capacity is smaller than rathena 3. can use plugin to inspect each file but Haru probably doesn't know about the weemapcache though, because using weemapcache on the import map_cache.dat also do the same
  12. StatusPoint += 1000; it seems you forgot to add jobchange into novice high and no need to resetstatus if your resetlvl is type 1
  13. prontera,151,172,4 script loco 813,{ #RRG = 10000; getitem Poring_Coin, 1000; disable_items; mes .npcname$; mesf "Hello! ^0000CD%s^000000 I am the best blacksmith in all Zone Zero RO, I can refine without breaking up to +10", strcharinfo(PC_NAME); mesf "To use my service you need: %d Hourly Points and %d Poring Coin", .Houly_Points_needed, .Poring_Coin_needed; mes "What part of your equipment do you want to refine?"; next; for ( .@i = 1; .@i <= 10; ++.@i ) .@menu$ += getequipname(.@i) +":"; .@s = select(.@menu$); if ( !getequipisequiped(.@s) ) { mes "Please put the equipment first"; emotion e_swt; close; } if ( !getequipisenableref(.@s) ) { mes "This part of equipment cannot be refine"; close; } if ( getequiprefinerycnt(.@s) >= .maxrefine ) { mes "this item already refined at the maximum level"; close; } mes .npcname$; mes "Refinement [+10]."; mesf "1 Refine = %d Hourly Points.", .Houly_Points_needed; mesf "You have %d Hourly Points", #RRG; mesf "1 Refine = %d Poring Coin", .Poring_Coin_needed; mesf "You have %d Poring Coin", countitem(Poring_Coin); mes "How much do you want to refine your item?"; next; input .@amount, 0, .maxrefine - getequiprefinerycnt(.@s); if ( .@amount <= 0 ) { mes "See ya"; close; } mes .npcname$; mesf "Do you want to refine %d times", .@amount; mesf "for %d Hourly Points and %d Poring Coin?", .Houly_Points_needed * .@amount, .Poring_Coin_needed * .@amount; next; if ( select ("Yes","No") == 2 ) close; mes .npcname$; if ( #RRG < .Houly_Points_needed * .@amount ) { mes "you don't have enough hourly points"; close; } if ( countitem(Poring_Coin) < .Poring_Coin_needed * .@amount ) { mes "you don't have enough Poring Coin"; close; } if ( getequiprefinerycnt(.@s) + .@amount > .maxrefine ) { mes "you can't refine over +10"; close; } #RRG -= .Houly_Points_needed * .@amount; delitem Poring_Coin, .Poring_Coin_needed * .@amount; successrefitem .@s, .@amount; npctalk "See you !! Grax."; mes "See you !! Grax."; close; OnInit: .npcname$ = "[Refiner]"; .maxrefine = 10; .Houly_Points_needed = 5; .Poring_Coin_needed = 1; end; }
  14. the answer is no we only have *setequipoption currently, which has to equip the item to make it effective <-- kinda useless prontera,161,185,5 script asda2sdad 1_F_MARIA,{ rentitem Knife, 60; equip Knife; setequipoption EQI_HAND_R, 1, VAR_STRAMOUNT, 50; end; }
  15. 1.5 - script - fix a bug if the player start with style number 510, the server throw you infinite loop error thanks to @clive for reporting ! and nope, rathena version which use inarray script command doesn't seem to be affected ... wtf why this PR not yet merge .... grrr .....
  16. "@bodystyle 1" ... only 3rd job having 2nd sprite https://github.com/HerculesWS/Hercules/blob/stable/conf/char/char-server.conf#L107-L118 and no idea what you mean in the 1st question
  17. I just mostly copy paste from my blog https://annieruru.blogspot.com/2019/01/compare-instance-script-between-rathena.html prontera,150,180,5 script Instance Challenger 4_M_EINMINER,{ mes " Big sun Big day ! "; next; if ( select( "~ Create Instance", "~ Clear Instance" ) == 2 ) { if ( has_instance2("guild_vs2") >= 0 ) instance_destroy( has_instance2("guild_vs2") ); close; } if ( has_instance2("guild_vs2") >= 0 ) { warp has_instance("guild_vs2"), 49,49; end; } if ( #gold_room_delay + 30 > gettimetick(2) ) { // deny for 30 seconds mesf "please wait %d seconds", #gold_room_delay + 30 - gettimetick(2); close; } if ( ( .@ins = instance_create( "Gold Room", getcharid(CHAR_ID_ACCOUNT), IOT_CHAR ) ) < 0 ) { mes "error : "+ .@ins; close; } if ( !getstrlen( instance_attachmap( "guild_vs2", .@ins, true, .@ins +"INST" ) ) ) { mes "error : 5"; instance_destroy .@ins; close; } instance_set_timeout 3600, 300, .@ins; // 1 hour to farm instance_init .@ins; warp has_instance("guild_vs2"), 49,49; #gold_room_delay = gettimetick(2); end; } guild_vs2,0,0,0 script gold_room FAKE_NPC,{ OnInstanceInit: monster instance_mapname("guild_vs2"), 0,0, "--ja--", PORING, 30, instance_npcname( strnpcinfo(NPC_NAME) )+"::OnMobDead"; // spawn 30 poring end; OnMobDead: monster instance_mapname("guild_vs2"), 0,0, "--ja--", PORING, 1, instance_npcname( strnpcinfo(NPC_NAME) )+"::OnMobDead"; // everytime player make a kill, just respawn it getitem Gold, 1; // gain this item end; } and I seriously hope you read the script_commands.txt before you make your next posts how to change the value, its all inside the documentations
  18. not recommend, when any character 1st login, will send to novice training ground https://github.com/HerculesWS/Hercules/blob/stable/npc/re/jobs/novice/academy.txt UNLESS you want to have the novice training ground script modify to instantly become job level 10, which allow novice to change job instantly iz_int,20,30,5 script kjdshfs 1_F_MARIA,{ // put this in novice training ground map if ( Class != Job_Novice || BaseExp || JobExp || JobLevel > 1 ) { mes "you can't use my service anymore"; close; } JobLevel = 10; skill NV_BASIC, 10, 0; warp "prontera", 155,185; end; } you can do this from client side or server side client side is not really my thing, but for server side, OnPCStatCalcEvent might do the trick why you want to disable 3rd class sprites ? I'm in love with arch bishop loli style dress I'm sorry, if you are new here, I don't recommend you to do this insane big modifications require both client side and server side to function my instinct tells me is skilltreeview.lub and server side db/skill_tree.conf
  19. Original Idea by both Myriad and 4144, brainstorm together in these 2 PR equipidx and delitemidx It was nearly going to release until we found out the inventory index can became empty and thus those 2 PR are probably not going to be accepted ... 2 Reasons -> 1. members might confuse to use *getinventorylist or *getinventorylistidx 2. maybe after the inventory has been VECTORize then maybe can Pull Request again Download: 1.0 plugin *getinventorylistidx *delitemidx *equipidx
  20. just use reduce damage taken ... imagine if the player having 199 attack speed, and trigger the hunter fly card effect every time, that effect kinda spammy
  21. bonus bNearAtkDef,`n`; | Adds `n`% damage reduction against melee physical attacks bonus bLongAtkDef,`n`; | Adds `n`% damage reduction against ranged physical attacks bonus bStr, readparam(bStr) *3/ 10; .... bonus bLuk, readparam(bLuk) *3/ 10;
  22. I get your point, this reminds me of the old eathena ... https://github.com/HerculesWS/Hercules/blob/620e60eebce2c1f35c5c9a82f6ca365b316587f5/conf-tmpl/script_athena.conf#L36-L38 I still remember at that time, I kept getting all the questions about why my custom script use OnPCKillEvent: label instead of using an PCKillEvent npc name this event_script_type is actually not feasible to do in the long run, when I worked on comelro, my 1st private server, I helped that server to squeeze all these labels into 1 single npc, using event_script_type 0 and whenever the admin download a script, and found having OnPC***Event, he has to ask me to convert that to use in a server now this event_script_type has been dropped long time ago, because imagine if this still exist today, everyone will ask questions how to merge all labels into 1 single npc and for your answer, yes, it actually save your server processing speed, but its not practical to do that from a developer stand point, it just increase your work load .... I still remember when the admin try to fix OnPCKillEvent npc, he broke my dota announcement script ...
  23. wait until I do pull request, not all my modification can be accept by hercules staff members all the questions you asked are totally valid and yes I can answer every single one of them
  24. yes ... ... of course not recommend its better to have multiple plugins to track your progress in your server that's the reason most of the time why rathena members doesn't want to upgrade their server to the latest revision because once they have bought a source modification, they couldn't upkeep it (don't have src knowledge), and so they stuck their revision .... .... and eventually their server became so outdated and have to do a server wipe if you just having a single plugin, once the plugin break, you will wonder where the error come from, because it will have over thousand of lines
  25. no.1 FIXED , I forgotten about the *guardianinfo script command no.3 function script call_from_item { getmapxy .@map$, .@x, .@y, UNITTYPE_PC; .@x = 10; for ( .@i = 0; .@i < .@x; ++.@i ) clone .@map$, .@x, .@y, "asdf::Onaaa", getcharid(CHAR_ID_CHAR), getcharid(CHAR_ID_CHAR); dispbottom sprintf( _$( "Spawned %d clones" ), .@x ); end; } - script asdf FAKE_NPC,{ Onaaa: announce sprintf( _$( "%s's slave clone died."), strcharinfo(PC_NAME) ), bc_all; end; } yes, have a callfunc from the item, then have another floating npc to trigger the event label
×
×
  • Create New...

Important Information

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