Jump to content

Alayne

Members
  • Content Count

    345
  • Joined

  • Last visited

  • Days Won

    22

Everything posted by Alayne

  1. Here's a version I've got corrected using the Haru scriptchecker. Honestly, haven't time nor server to test it here, but you shouldn't have error at loading. Maybe in game, but that's all I can do right here, right now. Tell me if you got problems later. One more point, on line 117, you should add the warp section to enter the instance (instance_enter doesn't exists on Herc) // -- Instance Devil Square Script ( Tyirial Script Concept )// -- Rescripted by Dang Tai Phong, hope you guys like it ... version : 1.0// -- For more information or new idea, please contact me via yahoo : [email protected],100,100,5 script Devil Square Guardian 852,{ // -- Name set .@ds_name$,"Devil Square"; if( BaseLevel < 100 ) { mes "[ Devil Square Guardian ]"; mes "Only users between Levels ^ff0000100 ~ 150^000000 can enter this Dungeon."; close; } mes "[ Devil Square Guardian ]"; mes "Welcome to the entrance door to ^FF0000" + .@ds_name$ + "^000000"; next; switch( select("Reserve the " + .@ds_name$ + " and enter:Leave") ) { case 1: set .@party_id, getcharid(1); // ----------------------------- if( .@party_id == 0 ) { mes "[ Devil Square Guardian ]"; mes "You need to be in a group."; close; } if( getpartyleader(.@party_id,2) != getcharid(0) ) { mes "[ Devil Square Guardian ]"; mes "Only the party leader can register for " + .@ds_name$ + "."; close; } if( DSquare_Timer >= gettimetick(2) ) { mes "[ Devil Square Guardian ]"; mes "You cannot enter " + .@ds_name$ + " again until ^0000FF" + callfunc("Time2Str",DSquare_Timer) + "^000000"; close; } if( Zeny < 100000 ) { mes "[ Devil Square Guardian ]"; mes "...I'm sorry, not enough zeny."; close; } set .@ds_instance, instance_create(.@ds_name$, .@party_id); if( .@ds_instance == -1 ) { mes "[ Devil Square Guardian ]"; mes "Your group is already registered on a Memorial Dungeon."; close; } else if( .@ds_instance < 0 ) { mes "[ Devil Square Guardian ]"; mes "Instance creation failed: " + .@ds_instance; mes "Please report this to a Game Master."; close; } if( instance_create(.@ds_name$, .@party_id) < 0 ) { instance_destroy(.@ds_instance); mes "[ Devil Square Guardian ]"; mes "Instance creation failed. No more free maps."; mes "Please report this to a Game Master."; close; } set 'dsparty_id, getcharid(1); set 'dsnext_open, gettimetick(2) + 7200; // Next allowed open time for players deletearray 'dsMembers[0],127; // Some part of disable/enable NPC donpcevent instance_npcname("#HiddenNpc", instance_id())+"::OnEnable"; donpcevent instance_npcname("#dswarp-11", instance_id())+"::OnInstanceInit"; donpcevent instance_npcname("#dswarp-12", instance_id())+"::OnInstanceInit"; set DSquare_Timer, 'dsnext_open; set 'dsMembers[0], getcharid(0); // Stores First Char ID set 'dsNext_i, 1; set Zeny, Zeny - 100000; close; for( set .@i, 0; .@i < 'dsNext_i; set .@i, .@i + 1 ) { if( getcharid(0) == 'dsMembers[.@i] ) break; } if( .@i == 'dsNext_i ) { if( DSquare_Timer >= gettimetick(2) ) { // User joined the party but has Devil Square Delay mes "[ Devil Square Guardian ]"; mes "You cannot enter " + .@ds_name$ + " again until ^0000FF" + callfunc("Time2Str",DSquare_Timer) + "^000000"; close; } else if( 'dsNext_i == 127 ) { // This party has invited lots of users to join Devil Square mes "[ Devil Square Guardian ]"; mes "No more users can enter " + .@ds_name$ + " registered with this party."; close; } else { // Add this new user to the member list set DSquare_Timer, 'next_open; set 'dsMembers['dsNext_i], getcharid(0); set 'dsNext_i, 'dsNext_i + 1; } } //warp end; case 3: close; }}function script Time2Str { set .@Time_Left, getarg(0) - gettimetick(2); set .@Days, .@Time_Left / 86400; set .@Time_Left, .@Time_Left - (.@Days * 86400); set .@Hours, .@Time_Left / 3600; set .@Time_Left, .@Time_Left - (.@Hours * 3600); set .@Minutes, .@Time_Left / 60; set .@Time_Left, .@Time_Left - (.@Minutes * 60); set .@Time$, ""; if( .@Days > 1 ) set .@Time$, .@Time$ + .@Days + " days, "; else if( .@Days > 0 ) set .@Time$, .@Time$ + .@Days + " day, "; if( .@Hours > 1 ) set .@Time$, .@Time$ + .@Hours + " hours, "; else if( .@Hours > 0 ) set .@Time$, .@Time$ + .@Hours + " hour, "; if( .@Minutes > 1 ) set .@Time$, .@Time$ + .@Minutes + " minutes, "; else if( .@Minutes > 0 ) set .@Time$, .@Time$ + .@Minutes + " minute, "; if( .@Time_Left > 1 || .@Time_Left == 0 ) set .@Time$, .@Time$ + .@Time_Left + " seconds."; else if( .@Time_Left == 1 ) set .@Time$, .@Time$ + .@Time_Left + " second."; return .@Time$;}2@ds,44,155,0 script #HiddenNpc -1,{ end;OnDisable: killmonster instance_mapname("2@ds"),instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead"; end;OnEnable: areamonster "2@ds",183,182,246,244,"[DS] ALICEL",1735,25,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead"; areamonster "2@ds",183,182,246,244,"[DS] ALIOT",1736,15,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead"; areamonster "2@ds",183,182,246,244,"[DS] ARCHDAM",1668,15,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead"; areamonster "2@ds",183,182,246,244,"[DS] CONSTANT",1745,20,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead"; areamonster "2@ds",183,182,246,244,"[DS] DARK PRIEST",1198,4,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead"; areamonster "2@ds",183,182,246,244,"[DS] ARCHANGELING",1388,1,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead"; end;OnDevilDead: set .@mobnumber,80; set .@mob_cnumber,mobcount("2@ds",instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead"); set .@mob_dead_number,.@mobnumber - .@mob_cnumber; if( .@mob_dead_number == 55 ) instance_announce 0, "Devil Square : 25 mobs to enter the 2nd round..",bc_map,"0xffff00"; if( .@mob_dead_number == 75 ) instance_announce 0, "Devil Square : 5 mobs to enter 2nd round..",bc_map,"0xffff00"; if( .@mob_dead_number == 80 ) { instance_announce 0, "Devil Square : will enter to 2nd round!!!",bc_map,"0xffff00"; goto OnDevilRound_2; } end;OnDevilRound_2: areamonster "2@ds",183,182,246,244,"[DS] DROSERA",1781,20,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_2"; areamonster "2@ds",183,182,246,244,"[DS] NECROMANCER",1870,30,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_2"; areamonster "2@ds",183,182,246,244,"[DS] RETRIBUTION",1702,5,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_2"; areamonster "2@ds",183,182,246,244,"[DS] OBSERVATION",1700,5,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_2"; areamonster "2@ds",183,182,246,244,"[DS] LADY SOLACE",1703,5,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_2"; areamonster "2@ds",183,182,246,244,"[DS] SHELTER",1701,5,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_2"; end;OnDevilDead_2: set .@mobnumber,70; set .@mob_cnumber,mobcount("2@ds",instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_2"); set .@mob_dead_number,.@mobnumber - .@mob_cnumber; if( .@mob_dead_number == 45 ) instance_announce 0, "Devil Square : 25 mobs to enter the 3rd round..",bc_map,"0xffff00"; if( .@mob_dead_number == 65 ) instance_announce 0, "Devil Square : 5 mobs to enter the 3rd round..",bc_map,"0xffff00"; if( .@mob_dead_number == 70 ) { instance_announce 0, "Devil Square : will enter to 3rd round!!!",bc_map,"0xffff00"; goto OnDevilRound_3; } end;OnDevilRound_3: areamonster "2@ds",183,182,246,244,"[DS] DIMIK",1673,10,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_3"; areamonster "2@ds",183,182,246,244,"[DS] DIMIK",1672,10,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_3"; areamonster "2@ds",183,182,246,244,"[DS] DIMIK",1671,10,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_3"; areamonster "2@ds",183,182,246,244,"[DS] DIMIK",1670,10,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_3"; areamonster "2@ds",183,182,246,244,"[DS] HIGH PRIEST MAGARETA",1637,6,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_3"; areamonster "2@ds",183,182,246,244,"[DS] MORROC SHADOW",1921,3,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_3"; areamonster "2@ds",183,182,246,244,"[DS] MORROC SHADOW",1918,3,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_3"; areamonster "2@ds",183,182,246,244,"[DS] MORROC SHADOW",1920,3,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_3"; areamonster "2@ds",183,182,246,244,"[DS] MORROC SHADOW",1919,3,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_3"; end;OnDevilDead_3: set .@mobnumber,58; set .@mob_cnumber,mobcount("2@ds",instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_3"); set .@mob_dead_number,.@mobnumber - .@mob_cnumber; if( .@mob_dead_number == 33 ) instance_announce 0, "Devil Square : 25 mobs to enter the 4th round..",bc_map,"0xffff00"; if( .@mob_dead_number == 53 ) instance_announce 0, "Devil Square : 5 mobs to enter the 4th round..",bc_map,"0xffff00"; if( .@mob_dead_number == 58 ) { instance_announce 0, "Devil Square : will enter to 4th round!!!!!!",bc_map,"0xffff00"; donpcevent instance_npcname("#dswarp-12", instance_id())+"::OnEnable"; goto OnDevilRound_4; } end; OnDevilRound_4: areamonster "2@ds",149,148,149,148,"[DS] Entweihen Crothen",1957,1,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_4"; areamonster "2@ds",135,135,165,165,"[DS] Thorny Skeleton",1958,11,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_4"; end; OnDevilDead_4: set .@mobnumber,12; set .@mob_cnumber,mobcount("2@ds",instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_4"); set .@mob_dead_number,.@mobnumber - .@mob_cnumber; if( .@mob_dead_number == 12 ) { instance_announce 0, "Devil Square : CONGRATULATION - 10 Treasure Boxs will be yours now",bc_map,"0xffff00"; donpcevent instance_npcname("#dswarp-12", instance_id())+"::OnInstanceInit"; donpcevent instance_npcname("#dswarp-11", instance_id())+"::OnEnable"; goto OnDevilRound_5; // Treasure Spawn Round } end;OnDevilRound_5: monster "2@ds",231,250,"Treasure Box",1324,1,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_5"; monster "2@ds",234,247,"Treasure Box",1328,1,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_5"; monster "2@ds",237,244,"Treasure Box",1332,1,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_5"; monster "2@ds",240,241,"Treasure Box",1336,1,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_5"; monster "2@ds",243,238,"Treasure Box",1340,1,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_5"; monster "2@ds",246,235,"Treasure Box",1344,1,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_5"; monster "2@ds",249,232,"Treasure Box",1348,1,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_5"; monster "2@ds",252,229,"Treasure Box",1352,1,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_5"; monster "2@ds",249,241,"Treasure Box",1356,1,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_5"; monster "2@ds",240,249,"Treasure Box",1360,1,instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_5"; end;OnDevilDead_5: set .@mobnumber,10; set .@mob_cnumber,mobcount("2@ds",instance_npcname("#HiddenNpc", instance_id())+"::OnDevilDead_5"); set .@mob_dead_number,.@mobnumber - .@mob_cnumber; instance_announce 0, "Devil Square : "+ strcharinfo(0) +" has opened the treasure box at Devil Square",bc_map,"0xffff00"; if( .@mob_dead_number == 10 ) { donpcevent instance_npcname("#HiddenNpc", instance_id())+"::OnDestroyInstance"; getpartymember getcharid(1),2; copyarray .@partymemberaid, $@partymemberaid, $@partymembercount; detachrid; for ( set .@i, 0; .@i < $@partymembercount; set .@i, .@i +1 ) { if (attachrid(.@partymemberaid[.@i])) callfunc("AddPoints", getcharid(3), 5); detachrid; } } end; OnDestroyInstance: initnpctimer; end;OnTimer500: instance_announce 0, "Devil Square will be closed in few seconds..", bc_map, 0xCCFF00; end;OnTimer19000: instance_warpall "prontera", 100,100; end; OnTimer22500: stopnpctimer; instance_destroy(instance_id()); end; }// -- Warp2@ds,168,168,0 script #dswarp-11 45,0,0,{OnInstanceInit: disablenpc instance_npcname("#dswarp-11", instance_id()); end;OnEnable: enablenpc instance_npcname("#dswarp-11", instance_id()); end;OnTouch: warp "2@ds",189,189; end;}2@ds,184,184,0 script #dswarp-12 45,0,0,{OnInstanceInit: disablenpc instance_npcname("#dswarp-12", instance_id()); end;OnEnable: enablenpc instance_npcname("#dswarp-12", instance_id()); end;OnTouch: mes "[ Devil Square Guardian ]"; mes "Are you ready..?"; if( select("Ready, GO!!!", "Nope") != 1 ) close; close2; warp "2@ds",163,163; end;}// -- Mapflags2@ds mapflag nowarp2@ds mapflag nowarpto2@ds mapflag noteleport2@ds mapflag nosave SavePoint2@ds mapflag nomemo2@ds mapflag nobranch2@ds mapflag nopenalty
  2. Your test is wrong. Actually your test says: "if you're base job is not Gunslinger AND if you are a gunslinger and if you don't have a falcon and you know the skill "Falcon Mastery", then get a falcon. Else blablabla" Is that what you wanna check?
  3. .@price = 0; // Zeny required for heal .@Buffs = 1; // Also buff players? (1: yes / 0: no) .@Delay = 2; // Heal delay, in seconds if (@HD > gettimetick(2)) end; if (.@price) { message strcharinfo(0),"Healing costs "+.@price+" Zeny."; if (Zeny < .@price) end; if(select("^0055FFHeal^000000:^777777Cancel^000000") == 2) close; Zeny -= .@price; } specialeffect2 EF_HEAL2; percentheal 100,100; if (.@Buffs) { if(BaseLevel == 150) { goto Buffer; } else { goto Buffs; } } close; Buffer: specialeffect2 EF_INCAGILITY; sc_start SC_INC_AGI,240000,10; specialeffect2 EF_BLESSING; sc_start SC_BLESSING,240000,10; if (.@Delay) { @HD = gettimetick(2)+.@Delay; } close;Buff: skilleffect 361,0; sc_start SC_ASSUMPTIO,360000,5; skilleffect 34,0; sc_start SC_BLESSING,300000,10; skilleffect 29,0; sc_start SC_INCREASEAGI,300000,10; skilleffect 112,0; sc_start SC_WEAPONPERFECTION,360000,10; skilleffect 380,0; sc_start SC_TRUESIGHT,360000,5; skilleffect 464,0; sc_start SC_KAUPE,360000,3; skilleffect 33,0; sc_start SC_ANGELUS,360000,10; skilleffect 463,0; sc_start SC_KAAHI,360000,7; skilleffect 383,0; sc_start SC_WINDWALK,360000,5; skilleffect 66,0; sc_start SC_IMPOSITIO,360000,5; skilleffect 67,0; sc_start SC_SUFFRAGIUM,360000,3; if (.@Delay) { @HD = gettimetick(2)+.@Delay; } close;} Couldn't test it right now, but it should do the job.
  4. Alayne

    Refiner

    ...You really should search a bit... That's a question that has already been asked a thousand times http://herc.ws/board/topic/8007-r-1-click-refine-safe/
  5. Hum...really not sure (cause I don't see why it should pop an error), but you should try changing $@ran by a local temporary npc variable. Plus your events are a bit messy. The "OnInit" for instance is right in the middle of a case. That's won't be causing your log to occurs but that's not helping to debug.
  6. Well it's a bit difficult without knowing when your problem occures. During which label execution does it triggers?
  7. And for copyarray setarray .@test [0],1,2,3;setarray .@test1 [0],4,5;setarray .@test2[0],6,7;if(Class == Swordman) copyarray.@test [getarraysize(.@test)], .@test1[0], getarraysize(.@test1);//produce 1,2,3,4,5if(Baselevel > 90) copyarray.@test [getarraysize(.@test)], .@test2[0], getarraysize(.@test2);//produce 1,2,3,6,7
  8. So you want a complete transposition on hercule. I'll give you that tomorrow (no time tonight, sorry)
  9. I think you're in the wrong section (should be in support, not request). For your problem, add a check in .@Buffs section to verify the BaseLevel value, and use different bonus affectations according to the level.
  10. Alayne

    Refiner

    There's a simple option to activate in base npc to enable the safe limit refine at once if that's what you're needing.
  11. Do you have the skill? If yes, maybe there's a check on your renting npc which verify your class too.
  12. In fact to be simpler, you should just tell us what your problem is...
  13. Just to be sure, you ask that when somebody log in at lvl 99/70 trans, it changes to...what?
  14. Well just as evilpunker already told, specialeffect will simply display the visual effect, but without applying the skill itself. To have it on, use npcskill or unitskillusepos
  15. Add: OnInit:set .ItemID, 0;set .NormalPorings,10;set .SpecialPorings,5;end; in the script. Replace 0, 10 and 5 for the value you wanna have as default.
  16. Sorry I really don't understand what your problem is. What do you want to do exactly? Cause the amount of monsters and the item Id can be set up by talking to the npc. You want a default value?
  17. Allright. I think I got it all: 1:A very good long range and support weapon. This weapon is very weak in close quarters due to it's slow fire and large size. However, if it has the time it needs it can cause massive damage to the enemy.-High Chance to cause bleeding on the enemy-Long Range-Pierces DEF-Slightly slows movement speed-Increases Hit Rate-Gives Falcon Mastery Skill-Gives user level 2 Detecting-+400% Damage with tracking skill-Grants bash skill level 7Class :^777777 Weapon^000000Equipped On :^777777 Both Hands^000000Atk :^777777 77^000000Weight :^777777 150^000000Applicable Job :^777777 Gunslinger^000000Script: <" bonus3 bAddEff,Eff_Bleeding,5000,ATF_SHORT; bonus bIgnoreDefClass,Class_Normal; bonus bSpeedRate,-5; bonus bHit,25; bonus2 bSkillAtk,GS_TRACKING,400; skill HT_DETECTING,2; skill HT_FALCON,1; skill SM_BASH,7; ">2:Very light and easy to handle.This weapon is in a fight for the lead for the best close quarters weapons with the custom shotgun.Also it aim very well around the body and performing the Desperado move.-SP Consumption +50%-Blinds by low chance-Pierces DEF-Increase Desperado Damage by 30%-Very small chance to drain 5% of enemys sp.-Small chance to drain 10% of your sp.Class :^777777 Weapon^000000Equipped On :^777777 Both Hands^000000Atk :^777777 50^000000Weight :^777777 80^000000Applicable Job :^777777 Gunslinger^000000Script: <" bonus bUseSPrate,50; bonus bIgnoreDefClass,Class_Normal; if(rand(1000)<50) sc_start SC_BLIND,2000,0; bonus2 bSkillAtk,GS_DESPERADO,30; bonus2 bSPVanishRate,5,30; autobonus "{ bonus2 bSPLossRate,10,1000; }", ">3:A very heavy but powerful gun.Due to it's heavy weight you cannot use it to hit people.The best suppresive weapon there is.-Change to auto-guard self.-Slows Movement Speed-Drake Effect-Chance of stunning enemy when attacking.-Unstrippable-Pierces DEFClass :^777777 Weapon^000000Equipped On :^777777 Both Hands^000000Atk :^777777 100^000000Weight :^777777 400^000000Applicable Job :^777777 Gunslinger^000000Script: <" bonus4 bAutoSpell,ML_AUTOGUARD,1,50,BF_NORMAL,0; bonus bSpeedRate,-5; bonus bNoSizeFix,0; bonus2 bAddEff,Eff_Stun,500; bonus bUnstripable,1; bonus bIgnoreDefClass,Class_Normal; ">4:A great close quarters weapon. Also this weapon is the best weapon for attacking multiple enemys or getting in close to make one hard single hit on an enemy.-All shots are spread shots.-Grants level 7 bash.-Chance to autoguard self.-Small chance to silence enemy+200% SP Consumption.+200% Damage with Spread shot skill.+30% Damage with Full Buster skill.-Pierces DEF.-Additional damage on ghost propertyClass :^777777 Weapon^000000Equipped On :^777777 Both Hands^000000Atk :^777777 100^000000Weight :^777777 200^000000Applicable Job :^777777 Gunslinger^000000Script: <" bonus bSplashRange,3; skill SM_BASH,7; bonus4 bAutoSpell,ML_AUTOGUARD,1,50,BF_NORMAL,0; bonus2 bAddEff,Eff_Silence,500; bonus bUseSPrate,200; bonus2 bSkillAtk,GS_SPREADATTACK,200; bonus2 bSkillAtk,GS_FULLBUSTER,30; bonus bIgnoreDefClass,Class_Normal; bonus2 bAddEle,Ele_Ghost,15; "> Tell me if something's missing.
  18. No, not entirely, you'll gonna replace the other monster. Select only the monster in mob_db.txt in re directory that you wanna add in pre-re, and add them in mob_db2.txt (or mob_db, as you wish), in pre-re directory. If it concern monsters using skill, you'll also have to copy the mob_skill_db.txt
  19. Well right now, no sorry. Just change the values for the stats, range, atk etc, and check that your mob's loot exists in pre-renewal. Remove or change them if that's not the case. It will entirely depends on how is configured your server (txt, sql), the mobs, the loots...
  20. Yes that's possible. You simply have to take a renewal monster from the renewal database and add it in pre-re database. But I strongly recommend you to change every stats and loots values to fit with pre-renewal mecanics.
  21. That's a bit...You shoudl reformulate your asking to be a bit more "sympathic" to obtain an answer... What do you need exactly? The script only, The database entry value?
  22. Alayne

    Please Help

    - script SearchSystem -1,{ mes "[ Find Monster ]"; mes "Select"; next; set .@select,select("- Monster","- Item"); if (.@select == 1) { set .@id,callfunc("Mobidsearch"); if (.@id == 1) { mes "[ Find Monster ]"; mes "^FF0000Monster Not Found!^000000"; close; } } else if (.@select == 2) { set .@id,callfunc("Itemsearch"); if (.@id == 1) { mes "[ Find Monster ]"; mes "^FF0000Item Not Found!^000000"; close; } set .@id,callfunc("Mobitemsearch",.@id); if (.@id == 1) { mes "[ Find Monster ]"; mes "^FF0000Item not found! ID: "+.@id+"^000000"; close; } } set .@id,callfunc("Mobmapsearch",.@id); if (.@id == 1) { mes "[ Find Monster ]"; mes "^FF0000Monster not found in map!^000000"; close; } end;OnInit: waitingroom "Find Monster",0; end;}function script Mobidsearch { mes "[ Find Monster ]"; mes "Please enter ID or Monster Name"; next; input .@mobsearch$; if (callfunc("Mobidsearch",.@mobsearch$) == "null") return 1; set .@menu$,""; for(set .@i,0; .@i < getarraysize(@mobidsearch_id); set .@i,.@i+1) set .@menu$,.@menu$+(@mobidsearch_id[.@i]?"- "+getmonsterinfo(@mobidsearch_id[.@i],0)+" ("+@mobidsearch_id[.@i]+") Lv."+getmonsterinfo(@mobidsearch_id[.@i],1)+":":":"); set .@mobid,select(.@menu$) - 1; next; set .@mobid,@mobidsearch_id[.@mobid]; deletearray @mobidsearch_id[0],255; return .@mobid;}function script Itemsearch { mes "[ Find Monster ]"; mes "Please enter ID or Item Name"; next; input .@itemsearch$; if (callfunc("Itemsearch",.@itemsearch$) == "null") return 1; set .@menu$,""; for(set .@i,0; .@i < getarraysize(@itemsearch_id); set .@i,.@i+1) set .@menu$,.@menu$+(@itemsearch_id[.@i]?"- "+getitemname(@itemsearch_id[.@i])+""+(getiteminfo(@itemsearch_id[.@i],2) == 4 || getiteminfo(@itemsearch_id[.@i],2) == 5?"["+getitemslots(@itemsearch_id[.@i])+"]":"")+" ("+@itemsearch_id[.@i]+"):":":"); set .@id,select(.@menu$) - 1; set .@id,@itemsearch_id[.@id]; deletearray @itemsearch_id[0],255; return .@id;}function script Mobitemsearch { set .@id,getarg(0); if (getitemname(.@id) == "null") return 1; if (mobitemsearch[.@id]) return 1; set .@menu$,""; if (@mobitemsearch_id[0] < 1) { mes "[ Find Monster ]^FF0000"; if (getiteminfo(.@id,2) == 4 || getiteminfo(.@id,2) == 5) mes ""+getitemname(.@id)+" ["+getitemslots(.@id)+"]"; else mes ""+getitemname(.@id)+""; mes "No drop from monster!^000000"; close; } for(set .@i,0; .@i < getarraysize(@mobitemsearch_id); set .@i,.@i+1) set .@menu$,.@menu$+"- "+getmonsterinfo(@mobitemsearch_id[.@i],0)+" ("+@mobitemsearch_id[.@i]+") ["+@mobitemsearch_per$[.@i]+"]:"; next; set .@id,select(.@menu$) - 1; set .@id,@mobitemsearch_id[.@id]; deletearray @mobitemsearch_id[0],255; deletearray @mobitemsearch_per$[0],255; return .@id;}function script Mobmapsearch { set .@id,getarg(0); if (getmonsterinfo(.@id,0) == "null") return 1; if (mobmapsearch[.@id]) return 1; if (@mobmapsearch$[0] == "") return 1; mes "[ Find Monster ]"; mes "Monster : "+getmonsterinfo(.@id,0)+" ["+.@id+"]"; mes "Level : "+getmonsterinfo(.@id,1)+""; mes "HP : "+getmonsterinfo(.@id,2)+""; mes "EXP : "+getmonsterinfo(.@id,3)+""; mes "Job EXP : "+getmonsterinfo(.@id,4)+""; mes "Attack : "+getmonsterinfo(.@id,5)+"-"+getmonsterinfo(.@id,6)+""; mes "Def : "+getmonsterinfo(.@id,7)+""; mes "Mdef : "+getmonsterinfo(.@id,8)+""; mes "^FF0000No size available^000000"; set .@menu$,""; for(set .@i,0; .@i < getarraysize(@mobmapsearch$); set .@i,.@i+1) set .@menu$,.@menu$+"- "+@mobmapsearch$[.@i]+" ["+@mobmapsearchcount[.@i]+"]:"; next; set .@id,select(.@menu$) - 1; set .@mobwarp$,@mobmapsearch$[.@id]; deletearray @mobmapsearch$[0],255; deletearray @mobmapsearchcount[0],255; dispbottom "Go to: "+.@mobwarp$+""; warp .@mobwarp$,0,0; return 0;} prontera,150,182,4 duplicate(SearchSystem) [Find Monster]#1 756 Here's a correct version. There was several problems: 1- You didn't use tab between declarations words, but spaces. 2- You didn't call the function properly. Instead of if (mobidsearch(.@mobsearch$) == "null") use if (callfunc("Mobidsearch",.@mobsearch$) == "null") 3- More an advice than anything else, work on your indentation. It makes the script way more easy to understand and to correct.
  23. No problem. Tagg the topic in "answered" if we're done
×
×
  • Create New...

Important Information

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