Jump to content

pan

Community Contributors
  • Content Count

    355
  • Joined

  • Last visited

  • Days Won

    13

Everything posted by pan

  1. What if I want to add : 220 Luk = 3secs Freeze. it will be : // Players that have luk above or equal 260 are immune to Freeze if( type == SC_FREEZE && sd->battle_status.luk >= 260 ) return 0; // Players that have luk above or equal 240 have freeze timer reduced to 2s if( type == SC_FREEZE && sd->battle_status.luk >= 240 && tick > 2000 ) tick = 2000; // is in ms return 0; // Players that have luk above or equal 220 have freeze timer reduced to 3s if( type == SC_FREEZE && sd->battle_status.luk >= 220 && tick > 3000 ) tick = 3000; // is in ms Is this correct? only the last one will not have return 0; No it's not correct, it should be something like: // Players that have luk above or equal 260 are immune to Freeze if( type == SC_FREEZE && sd->battle_status.luk >= 260 ) return 0; // Players that have luk above or equal 240 have freeze timer reduced to 2s if( type == SC_FREEZE && sd->battle_status.luk >= 240 && tick > 2000 ) tick = 2000; // is in ms if( type == SC_FREEZE && sd->battle_status.luk >= 220 && sd->battle_status.luk < 240 && tick > 3000 ) tick = 3000;If you return, the rest of this function won't be read, then it won't activate SC_FREEZE. Note that there are two different checks regarding luk in the third condition
  2. No you don't, if you add that SC_FREEZE will not be started in players that have luk >= 240
  3. Hello, lately I was reading Hercules' source-code and I've noticed that there are many functions that are defined as 'int' types but are constant, they're returning only one value. Look for instance at pc_bonus it returns 0 in all possible inputs... I guess that functions like this should return whether they were successful or not, otherwise there's no way to handle exceptions like if there was an incorrect input. For instance pc_bonus should be defined as 'bool' instead of 'int' and return whether it was successful or not, I'm sure that there're many functions that are defined "incorrectly" as well. Hope I've helped, Pan.
  4. I haven't tested those changes in-game, but they should work fine c: otherwise just post and I'll correct any mistakes, ok? Open src/map/status.c and search for: case SC_FREEZE: //Undead are immune to Freeze/Stone if (undead_flag && !(flag&1)) return 0;Add below: // Players that have luk above or equal 260 are immune to Freeze if( type == SC_FREEZE && sd->battle_status.luk >= 260 ) return 0; // Players that have luk above or equal 240 have freeze timer reduced to 2s if( type == SC_FREEZE && sd->battle_status.luk >= 240 && tick > 2000 ) tick = 2000; // is in msSave and rebuild. Happy new year
  5. I've read my modifications again and I found what was wrong with those requirements... Now it's working, I tested in-game.http://pastebin.com/vmxRZR8P I'll correct my other post...
  6. That's exactly what I am attempting. By the way, the IDs for the summoning skills are 2457~2460, so maybe that' incorrect? Still, at least 3 out of 4 of the skills should work, yet they don't. *edit* Mechanic Fuel worked. Thank you so much. 2457,0,6,4,3,0x1,0,3,1,yes,0,0,0,none,0, SO_SUMMON_AGNI,Summon Fire Spirit Agni2458,0,6,4,1,0x1,0,3,1,yes,0,0,0,none,0, SO_SUMMON_AQUA,Summon Water Spirit Aqua2459,0,6,4,4,0x1,0,3,1,yes,0,0,0,none,0, SO_SUMMON_VENTUS,Summon Wind Spirit Ventus2460,0,6,4,2,0x1,0,3,1,yes,0,0,0,none,0, SO_SUMMON_TERA,Summon Earth Spirit TeraOh, sorry, they're indeed wrong, I forgot to add Summon Fire Spirit Agni in the list: // 990 to 997 sorcerer stones only works when using summon skills if( (req.itemid[i] >= 990 && req.itemid[i] <= 997) && sd->special_state.no_elementalstones && (skill_id >= SO_SUMMON_AQUA && skill_id <= SO_SUMMON_TERA) ) req.itemid[i] = req.amount[i] = 0;to: // 990 to 997 sorcerer stones only works when using summon skills if( (req.itemid[i] >= 990 && req.itemid[i] <= 997) && sd->special_state.no_elementalstones && (skill_id >= SO_SUMMON_AGNI && skill_id <= SO_SUMMON_TERA) ) req.itemid[i] = req.amount[i] = 0;Build and see if this works if it does I'll update my other post to add all this changes, ok? Regards
  7. Sourcefile is at:http://pastebin.com/TFS0GCDsRegards Is there a .wav file for this? There isn't, any file that is in your wav folder will work.If you're going to use the command download the new version: http://herc.ws/board/files/file/88-broadcast-alarm/
  8. pan

    Broadcast Alarm

    I've just updated the command, I forgot to add support to spaces in messages... http://pastebin.com/idsFvmhJ Try using @kamic and see if @balarm colors are working alike, I've just checked in my hexed and they're working.
  9. There's no need to modify your source code to do that, it's completely "doable" using scripts... The only thing that I'm not so sure is displaying a char name in red, I guess you'd need to modify your client to do that.
  10. Which skills are you trying to use? Only the ones that are in this range: 2458 to 2460 are working without stones, only skills that summon :x Yes it is possible just open srcmapskill.c and search for: // 6120 to 6123 Paint related items if( (req.itemid[i] >= 6120 && req.itemid[i] <= 6123) && sd->special_state.no_paintcans ) req.itemid[i] = req.amount[i] = 0;Add below: // 6146 Magic fuel if( req.itemid[i] == 6146 && sd->special_state.no_fuel ) req.itemid[i] = req.amount[i] = 0;Now open src/map/pc.h and search for: unsigned int no_paintcans : 1;Add below: unsigned int no_fuel : 1;Now open src/map/map.h and search for:SP_NO_CATALYSTSTONES, SP_NO_ELEMENTALSTONES,SP_NO_PAINTCANS, // 2059-2061 [pan]Replace it with: SP_NO_CATALYSTSTONES, SP_NO_ELEMENTALSTONES,SP_NO_PAINTCANS,SP_NO_FUEL, // 2059-2062 [pan]Now open src/map/pc.c and search for: case SP_NO_PAINTCANS: if(sd->state.lr_flag != 2) sd->special_state.no_paintcans = 1; break;Add below: case SP_NO_FUEL: if(sd->state.lr_flag != 2) sd->special_state.no_fuel = 1; break;Search for: case SP_NO_PAINTCANS: val = sd->special_state.no_paintcans?1:0; break;Add below: case SP_NO_FUEL: val = sd->special_state.no_fuel?1:0; break;Now open const.txt and search for:bNoPaintCans 2061Add below:bNoFuel 2062Here's the new patch: http://pastebin.com/GpKYdkU0
  11. pan

    Broadcast Alarm

    As far as I'm aware of it's working exactly the same way that @kamic is working, I don't know all colors but if you use 90 for instance it's dark blue
  12. You could code a new mapflag that works just like GvG, but if traps change their look only in castle maps, independing on which mapflag is active, then the client is parsing them this way only in this type of map, so you could change the type of maps that all castles are, client and server-side and see if that works, but I'm not so sure... As far as I'm aware of there's not much that can be done server-side to "fix" this issue :x Sometime ago there was a client edit called XRay in that type of client you could even add new Unit types, so if you can find a XRay that works properly with your server and then edit it c:
  13. Well, it depends on which item is required to use the skill, I didn't add "face paint" :x I don't know why this error is returning, maybe you're calling the script function bonus with a 'bonus' that isn't on dbconst.txt? Well I added all paint related items to the diff and to my last post c:
  14. To use parrying you need to be "wearing" a two-handed sword (http://irowiki.org/wiki/Parry), you need to change the requisites of this skill or it won't work with any class that can't use this kind of weapon c:
  15. My guess is that the way that the cursor changes is client-related, the server just sends packets that identify an unit as a trap, then your client chooses on how it'll be displayed. You could change which kind of unit is identified as a trap and change sprites in your grf file, but you'd have to replace an existing unit type and the client would handle it the same way it was handled before your "change" @skill.h/// The client view ids for land skills.enum { UNT_SAFETYWALL = 0x7e,[...] UNT_HIDDEN_TRAP, //TODO UNT_TRAP, //TODO UNT_HIDDEN_WARP_NPC, //TODO UNT_USED_TRAPS, @clif.c//Sends a change-base-look packet required for traps as they are triggered.void clif_changetraplook(struct block_list *bl,int val){ unsigned char buf[32];#if PACKETVER < 4 WBUFW(buf,0)=0xc3; WBUFL(buf,2)=bl->id; WBUFB(buf,6)=LOOK_BASE; WBUFB(buf,7)=val; clif->send(buf,packet_len(0xc3),bl,AREA);#else WBUFW(buf,0)=0x1d7; WBUFL(buf,2)=bl->id; WBUFB(buf,6)=LOOK_BASE; WBUFW(buf,7)=val; WBUFW(buf,9)=0; clif->send(buf,packet_len(0x1d7),bl,AREA);#endif}Happy holidays
  16. It looks like it's correct: Job_Name: { // Job names as in src/map/pc.c (they are hardcoded at the moment so if you want to add a new job you should add it there) inherit: ( "Other_Job_Name" ); // Base job from which this job will inherit its skill tree. NV_TRICKDEAD inheritance is skipped for non-novices from the source skills: { // SKILL_NAMEs come from the Name (16th column) value in db/re/skill_db.txt SKILL_NAME1: Max_Level // Use this for skills that don't have other skill prerequisite; Max_Level is a numeric value that should match your client side files SKILL_NAME2: { // Use this for skills which have other skills as prerequisites MaxLevel: Max_Level // Max_Level is a numeric value that should match your client side files SKILL_NAME_PREREQUISITE: Level_Prerequisite // The prerequisite skill and min level for having this skill available. Should also match your client side files SKILL_NAME_PREREQUISITE2: Level_Prerequisite2 // You can add as many prerequisite skills as you want. Minimum of 1 if you add a skill this way }}(From dbreskill_tree.conf)
  17. It is working you must have forgotten to rebuild your server after redoing those changes, if you want I made a diff so you can activate those changes "automatically" http://pastebin.com/Eya2XN52
  18. I forgot to add in my last post, open src/map/pc.c and search for: case SP_NO_GEMSTONE: if(sd->state.lr_flag != 2) sd->special_state.no_gemstone = 1; break;Add below it: case SP_NO_CATALYSTSTONES: if(sd->state.lr_flag != 2) sd->special_state.no_catalyststones = 1; break; case SP_NO_ELEMENTALSTONES: if(sd->state.lr_flag != 2) sd->special_state.no_elementalstones = 1; break; case SP_NO_PAINTCANS: if(sd->state.lr_flag != 2) sd->special_state.no_paintcans = 1; break;Now it should be working just fine c: I also created a patch this time:http://pastebin.com/Vuu7r9DE I'll edit my other post as well
  19. Oh sorry, I got that totally wrong those formulae that are in my other are the attack formulae :x to change the skill range just modify your skill_db: 2328,0,6,4,-1,0x2,1:2:3:4:5,5,1,no,0,0,0,weapon,0, SR_EARTHSHAKER,Earth Shaker 1:2:3:4:5 to whichever value you desire Sorry for my other answer :x
  20. The mod that's in the topic that you posted doesn't work at all :x So I've made some changes to fit what you want... Built successfully and tested in-game c: If you want any map to have asuraabsorb just set the mapflag and it'll work. Happy holidays
  21. Sorry, I didn't understand what you need, could you post what you want to do? Do you want to block asura (MO_EXTREMITYFIST) outside a map?
  22. File Name: Broadcast Alarm File Submitter: pan File Submitted: 25 Dec 2013 File Category: Plugins @balarm <color> <type> <file name> <message> Type 0 - Global message 1 - Local message File name It's a file that is inside your grfwavfile.wav WARNING! If nonexistent file is put all hexeds that receive this broadcast will crash! Color Uses the same configuration as '@kamic' Source-code: http://pastebin.com/TFS0GCDs v1.0 http://pastebin.com/idsFvmhJ v1.1 For more information see: http://herc.ws/board/topic/3525-broadcast-with-sound-alarm/ Click here to download this file
  23. pan

    Broadcast Alarm

    Version 1.1

    57 downloads

    @balarm <color> <type> <file name> <message> Type 0 - Global message 1 - Local message File name It's a file that is inside your grf\wav\file.wav WARNING! If nonexistent file is put all hexeds that receive this broadcast will crash! Color Uses the same configuration as '@kamic' Source-code: http://pastebin.com/TFS0GCDs v1.0 http://pastebin.com/idsFvmhJ v1.1 For more information see: http://herc.ws/board/topic/3525-broadcast-with-sound-alarm/
  24. Oh sorry :x here are the changes that you need to do: Open src/map/pc.c and search for: case SP_NO_GEMSTONE: val = sd->special_state.no_gemstone?1:0; break;Add below it: case SP_NO_CATALYSTSTONES: val = sd->special_state.no_catalyststones?1:0; break; case SP_NO_ELEMENTALSTONES:val = sd->special_state.no_elementalstones?1:0; break; case SP_NO_PAINTCANS: val = sd->special_state.no_paintcans?1:0; break; case SP_NO_FUEL: val = sd->special_state.no_fuel?1:0; break;Search for: case SP_NO_GEMSTONE: if(sd->state.lr_flag != 2) sd->special_state.no_gemstone = 1; break;Add below it: case SP_NO_CATALYSTSTONES: if(sd->state.lr_flag != 2) sd->special_state.no_catalyststones = 1; break; case SP_NO_ELEMENTALSTONES: if(sd->state.lr_flag != 2) sd->special_state.no_elementalstones = 1; break; case SP_NO_PAINTCANS: if(sd->state.lr_flag != 2) sd->special_state.no_paintcans = 1; break; case SP_NO_FUEL: if(sd->state.lr_flag != 2) sd->special_state.no_fuel = 1; break;Now open src/map/map.h and search for:SP_SKILL_USE_SP,SP_MAGIC_ATK_ELE, SP_ADD_FIXEDCAST, SP_ADD_VARIABLECAST, //2055-2058Add below it: SP_NO_CATALYSTSTONES, SP_NO_ELEMENTALSTONES,SP_NO_PAINTCANS,SP_NO_FUEL, // 2059-2062 [pan]Open src/map/pc.h and search for:unsigned int bonus_coma : 1;Add below: unsigned int no_catalyststones : 1; unsigned int no_elementalstones : 1; unsigned int no_paintcans : 1; unsigned int no_fuel : 1;Open src/map/skill.c, search for: if( itemid_isgemstone(req.itemid[i]) && skill_id != HW_GANBANTEIN ) { if( sd->special_state.no_gemstone ) { // All gem skills except Hocus Pocus and Ganbantein can cast for free with Mistress card -helvetica if( skill_id != SA_ABRACADABRA ) req.itemid[i] = req.amount[i] = 0; else if( --req.amount[i] < 1 ) req.amount[i] = 1; // Hocus Pocus always use at least 1 gem } if(sc && sc->data[SC_INTOABYSS]) { if( skill_id != SA_ABRACADABRA ) req.itemid[i] = req.amount[i] = 0; else if( --req.amount[i] < 1 ) req.amount[i] = 1; // Hocus Pocus always use at least 1 gem } }Add below it: // 7521 to 7524 ninja stones if( (req.itemid[i] >= 7521 && req.itemid[i] <= 7524) && sd->special_state.no_catalyststones ) req.itemid[i] = req.amount[i] = 0; // 6120 to 6123 Paint related items if( (req.itemid[i] >= 6120 && req.itemid[i] <= 6123) && sd->special_state.no_paintcans ) req.itemid[i] = req.amount[i] = 0; // 6146 Magic fuel if( req.itemid[i] == 6146 && sd->special_state.no_fuel ) req.itemid[i] = req.amount[i] = 0;Now search for: case SO_EARTH_INSIGNIA: req.itemid[skill_lv-1] = skill->db[idx].itemid[skill_lv-1]; req.amount[skill_lv-1] = skill->db[idx].amount[skill_lv-1]; break; }Add below: // 990 to 997 sorcerer stones only works when using summon skills if( (req.itemid[skill_lv-1] >= 990 && req.itemid[skill_lv-1] <= 997) && sd->special_state.no_elementalstones && (skill_id >= SO_SUMMON_AGNI && skill_id <= SO_SUMMON_TERA) ) req.itemid[skill_lv-1] = req.amount[skill_lv-1] = 0;Now open /db/const.txt and search for:bVariableCast 2058Add below:bNoCatalystStones 2059bNoElementalStones 2060bNoPaintCans 2061bNoFuel 2062Save all files and rebuild your map-server... Just add these codes to your mistress card:bonus bNoCatalystStones,0; bonus bNoElementalStones,0; bonus bNoPaintCans,0; bonus bNoFuel,0;It's done c: If you're having any trouble just post, ok? Happy holidays EDIT: I corrected everything in this post, everything is worked and has been tested in-game. Diff: http://pastebin.com/vmxRZR8P
  25. pan

    @hatredreset?

    Well there's a way to reset hatred: ACMD(hatereset){ pc->resethate(sd); clif->message(fd, "Reset 'hate' mobs, kicking..."); clif->GM_kick(NULL, sd); return true;}Although I'm not sure if this is going to work...
×
×
  • Create New...

Important Information

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