Jump to content

Winterfox

Members
  • Content Count

    403
  • Joined

  • Last visited

  • Days Won

    10

Everything posted by Winterfox

  1. Well you forgot a closing ) for the eaclass command. If you provide a parameter for eaclass it doesn't use the users current players class to return the job number for the check. It makes no sense to use the job number bitmask as parameter as it uses the class as parameter to give you the job number. The command just returns the job number to check if the players has a certain base job you need to check it against the according bitmasks. Also you have the "" in front of your function and : afterwards, so you add a empty menu option, which is uneccessary. .skill_set$[2] = ( ( ( eaclass() & EAJ_BASEMASK ) == EAJ_MAGE ) ? "" : "SP Rec:" ) + "Sight:Napalm Beat:Saftey Wall:Soul Strike:Cold Bolt:Frost Driver:Stone Curse:FireBall:FireWall:Fire Bolt:Lightning Bolt:ThunderStorm"; The documentation for that command seems to be incorrect though: I guess it should be: Otherwise it would make no sense since why should i give a function that gives me a job number, a job number just to give me that job number?
  2. That is exactly what a instance does. It creates copies of a set of maps and makes them unique per party / guild. So they never see each other. For example Orc Memory Dungeon is a instance.
  3. If it is a normal npc you should provide you original npc for reference. Its is easier to help you out or write a new one that is closer to what you want. If you put that into a item It depends where you put your OnPCKillEvent. If you want something to run anytime you should put it into Script field. My guess it you have it on OnEquipScript. item_db: ({ // =================== Mandatory fields =============================== Id: ID (int) AegisName: "Aegis_Name" (string, optional if Inherit: true) Name: "Item Name" (string, optional if Inherit: true) // =================== Optional fields ================================ Type: Item Type (int, defaults to 3 = etc item) Buy: Buy Price (int, defaults to Sell * 2) Sell: Sell Price (int, defaults to Buy / 2) Weight: Item Weight (int, defaults to 0) Atk: Attack (int, defaults to 0) Matk: Magical Attack (int, defaults to 0, ignored in pre-re) Def: Defense (int, defaults to 0) Range: Attack Range (int, defaults to 0) Slots: Slots (int, defaults to 0) Job: Job mask (int, defaults to all jobs = 0xFFFFFFFF) Upper: Upper mask (int, defaults to any = 0x3f) Gender: Gender (int, defaults to both = 2) Loc: Equip location (int, required value for equipment) WeaponLv: Weapon Level (int, defaults to 0) EquipLv: Equip required level (int, defaults to 0) EquipLv: [min, max] (alternative syntax with min / max level) Refine: Refineable (boolean, defaults to true) View: View ID (int, defaults to 0) BindOnEquip: true/false (boolean, defaults to false) Script: <" Script (it can be multi-line) "> OnEquipScript: <" OnEquip Script (can also be multi-line) "> OnUnequipScript: <" OnUnequip Script (can also be multi-line) "> // =================== Optional fields (item_db2 only) ================ Inherit: true/false (boolean, if true, inherit the values that weren't specified, from item_db.conf, else override it and use default values)},...)
  4. The only way i can think of is to create a instance of the map with the emulation option if the map isn't named like the standard for instance maps. This approach is quiet limited though, since for instancing you have to provide a guild or party and people you want to use that map need to be in either. Also you will need to create a special warp npc if you want it to look like a normal warp to enter the map and if you want a empty map you would need to disable all scripts manually since the instancing creates copies of all npcs on the map.
  5. @@mrlongshen Exactly, you just need to separate them by a comma and a space.
  6. @mrlongshen I took them from the script Dogpatch posted. .@mvpIdList holds the MVP IDs. .mvpCardIds holds the according card ids. .mvpCardRates holds the according drop rate.
  7. @@mrlongshen Yes, i copied the script you posted and it worked exactly as intended. I killed a Eddga and got his card directly into my inventory and the announcement got made.
  8. @@mrlongshen I spawned a Eddga and killed it and got his card.
  9. @@mrlongshen As the comment says 1 = 0.01%
  10. @@fxfreitas the screenshot is pretty small you should think about making it bigger, you can hardly see anything.
  11. @@mrlongshen I named a variable wrong, thats why it didn't get executed. Also the cards will go directly into the inventory since the card drop is disabled by script and given to the player by the rate you can configure in the script. Check it out here: http://upaste.me/36f421015cab9f3e5 Also i am no sir. :/
  12. @@mrlongshen You got it via picking it up or directly in your inventory? What MVP did you get the card from?
  13. I am not sure if someone will do such a big thing for free.
  14. @@jaiko23 https://github.com/HerculesWS/Hercules/blob/master/src/map/battle.c
  15. @@evilpuncker Thanks for remembering me. I had something in the back of my mind i thougt i had forgotten and you reminded me of what it was. Updated version: http://upaste.me/71132101108342abc
  16. No source mods needed. Already posted a script for it which includes all the MVP cards in Pre-RE. @@Dogpatch It is kind of inefficient and requires you to edit the mobs to not loot the item the normal way. I dont think that kind of workaround is a good way to go. Also you can't really show the rate of the card by calculation atleast not with a pretty big effort since the script language doesn't support fractions. But well thats just my opinion on that solution, if one wants to go with it, i would recommend to use this optimized version: http://upaste.me/7559210089e1481dc
  17. I think writing that as script is possible, but you would need some source changes / plugins. Either a OnLoot label or a getareauserids command. But if you request such a thing you also could ask for a mvp announcer plugin / source mod in the first place. You could ask @@AnnieRuru as it seems she did what you want allready. Atleast i found a snippet that seems to do what you want that she did here: http://www.eathena.ws/board/index.php?showtopic=272695.
  18. @@glemor123 http://pastebin.com/uVi7Ndqn
  19. @@Neferpitou http://pastebin.com/haau0QWx
  20. @@glemor123 Depends on where you placed it. If it is in OnPCDieEvent: to make sure the event ends if noone is on the map because of logging out, than its allright. Like here: http://pastebin.com/nMaAEETK
  21. I guess you need to change some stuff in the sourcecode for that. See if someone with a connection that uses that IP/MAC allready used that command. But there is no real way to prevent such things, since there are Proxys/VPNs or MACspoofers that simply make that kind of countermeasures useless. What is the purpose of this? Do you want to allow multi accounting and every player to have a offline shop? On the other hand, if you for example have 2 siblings playing in the same household and both want to sell offline while doing something else only one can.
  22. I recommend to make it more readable and fix some quirks first. Some things i see: 1. Prize is disabled twice in OnInit. 2. Call killmonsterall is called several times in succession even though one time is enough per condition. 3. atcommand("@alive"); doesn't need the username, since it's called like the player typed it by himself with gm level 99 and @alive by default revives the user that typed the command if no name is provided. 4. You can change: if (BaseLevel > 1) goto NO;if (class == 0) goto event;if (class > 0) goto NO;event: to if (BaseLevel > 1) goto NO; that actually means: IF baselevel > 1 > 0 GOTO NO. You dont need another label for your event since if either conditions are true the interpreter jumps to NO and never runs the stuff after the if. Also a base level > 1 char doesn't posses a class you need to check for. 5. You can change: if (sex == 1) {announce "In ' Zombie Vs. Novice ' has won" + strcharinfo (0) + "! We congratulate him!",0;}else {announce "In ' Zombie Vs. Novice ' has won" + strcharinfo (0) + "! We congratulate her!",0;}; to announce "In ' Zombie Vs. Novice ' has won" + strcharinfo (0) + "! We congratulate " + ((Sex) ? "him" : "her") + "!",0; .6. Since you have a npctimer anyway, you could use it for your announcement timing instead of sleep. 7. You can change: OnTimer5000:if ( getmapusers("quiz_01") == 0 ){killmonsterall "quiz_01";announce "'Zombie Vs. Novice' has ended with Event, as all have died",0;disablenpc "Prize";stopnpctimer;end;}else if ( getmapusers("quiz_01") > 1 ){mapannounce "quiz_01",getmapusers("quiz_01") +"the player still survive on Event.",0,0x00FF00;;initnpctimer;end;}initnpctimer;end; to OnTimer5000: if ( getmapusers("quiz_01") == 0 ) { killmonsterall "quiz_01"; announce "'Zombie Vs. Novice' has ended with Event, as all have died",0; disablenpc "Prize"; stopnpctimer; end; } if ( getmapusers("quiz_01") > 1 ) mapannounce "quiz_01",getmapusers("quiz_01") +"the player still survive on Event.",0,0x00FF00; initnpctimer;end; 8. The killmonsterall at the event start is redudant since either they get killed by your checks anyway. 9. You can change OnPCDieEvent:getmapxy .@mapnvz$,.@xnvz,.@ynvz,0;if ( .@mapnvz$ == "quiz_01") {sleep2 1;warp "prontera",154,95;atcommand "@alive "+ strcharinfo(0);dispbottom "you have lost...";}sleep2 1000;if(getmapusers("quiz_01") == 1){killmonsterall "quiz_01";mapannounce "quiz_01","You have won, approach please to npc Prize.",0;killmonsterall "quiz_01";killmonsterall "quiz_01";killmonsterall "quiz_01";killmonsterall "quiz_01";enablenpc "Prize";killmonsterall "quiz_01";stopnpctimer;end;}if(getmapusers("quiz_01") == 0){killmonsterall "quiz_01";killmonsterall "quiz_01";killmonsterall "quiz_01";killmonsterall "quiz_01";stopnpctimer;end;}end;} to: OnPCDieEvent: if ( strcharinfo(PC_MAP) == "quiz_01") { warp("prontera",154,95); atcommand("@alive"); dispbottom("you have lost..."); } if(getmapusers("quiz_01") == 1){ killmonsterall("quiz_01"); announce("You have won, approach please to npc Prize.", bc_map); enablenpc("Prize"); stopnpctimer; }end; 10. The var sex has to be named Sex, it won't break your script but drop a error message on the server. I gave it a shot and tried to clean it, let me know how it works out: http://pastebin.com/HNnpL42L
  23. @@minx123 1. Calculate coordinates to where? 2. *announce "<text>",<flag>{,<fontColor>{,<fontType>{,<fontSize>{,<fontAlign>{,<fontY>}}}}}; 3. *bindatcmd "command","<NPC object name>::<event label>"{,<group level>,<group level char>,<log>}; I recommend you to check this: https://github.com/HerculesWS/Hercules/blob/master/doc/script_commands.txt here you can find all commands that you can use.
  24. I tested it and it worked fine for me. If you did what the people here told you and did it correctly, it seems there has to be another script or a part of your script you didn't show, that causes your problem. Here is what i did to test your snippet: 1. I went to mapflag/gvg.txt and changed the line guild_vs1 to //guild_vs1. 2. I added this script: - script test -1,{ OnPCDieEvent: if( strcharinfo(3) == "guild_vs1" ) { @dead_pts += 1; if ( @dead_pts == 1 ) { message strcharinfo(0), "Reviving..."; sleep2(3000); atcommand("@alive"); message(strcharinfo(0), "1 more life left."); end; } if ( @dead_pts >= 2 ) { @dead_pts = 0; message(strcharinfo(0), "Sorry, but you failed the quest. Better luck next time!"); sleep2(5000); warp("SavePoint",0,0); end; } } end;} 3. Warped to guild_vs1 and died 2 times and it worked as intended. 4. Repeated step 3 for 2 times to be sure. Maybe someone else could give it a shot and test if he gets the same issue as @@Lord Ganja.
  25. - script mobspawn_restriction -1,{ OnInit: bindatcmd("monster", strnpcinfo(3) + "::OnMonster", 1); bindatcmd("monstersmall", strnpcinfo(3) + "::OnMonsterSmall", 1); bindatcmd("monsterbig", strnpcinfo(3) + "::OnMonsterBig", 1); .maxMobsPerSpawn = 5; end; OnMonster: .@cmdType$ = "monster"; OnMonsterSmall: if(.@cmdType$ == "") .@cmdType$ = "monstersmall"; OnMonsterBig: if(.@cmdType$ == "") .@cmdType$ = "monsterbig"; if(getgmlevel() >= 60) end; .@mobCount = (.@atcmd_parameters$[1] == "") ? 1 : atoi(.@atcmd_parameters$[1]); if(.@mobCount > .maxMobsPerSpawn) { dispbottom("You can't spawn more than " + .@mobCount + " mobs at a time."); end; } atcommand("@" + .@cmdType$ + " " + .@atcmd_parameters$[0] + " " + .@mobCount); end;}
×
×
  • Create New...

Important Information

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