Jump to content

PB&JJ

Members
  • Content Count

    12
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Upvote
    PB&JJ got a reaction from Tio Akima in Check around cell And mob dead   
    Not sure why mob_dead doesn't work for you.

    I was going to suggest foreachinrange, but that applies a function. now there is another function called map_count_oncell (called by map->count_oncell)


    Example code Under the assumption of a rectangular range & positive range value:
     
     
  2. Upvote
    PB&JJ got a reaction from iCORE in [Request] Size changer npc   
    Here you go.
     
    prontera,150,150,5 script SizeChanger 4_M_PECOKNIGHT,{ mes "What size would you like to have?"; mes "These changes are persisant after logout"; next; sizeVal = select("Normal:Small:Large") -1; mes "There you go!"; close2; OnPCLoginEvent: atcommand "@size "+ sizeVal; end; }  
  3. Upvote
    PB&JJ got a reaction from tedexx in [Request] Size changer npc   
    Here you go.
     
    prontera,150,150,5 script SizeChanger 4_M_PECOKNIGHT,{ mes "What size would you like to have?"; mes "These changes are persisant after logout"; next; sizeVal = select("Normal:Small:Large") -1; mes "There you go!"; close2; OnPCLoginEvent: atcommand "@size "+ sizeVal; end; }  
  4. Upvote
    PB&JJ reacted to bWolfie in How to allow one ip use on an NPC   
    Yes i understand all that. I want to make it so the NPC takes a record of their IP and block usage of that npc afterwards.
     
    I did some searching and found a guild pack script to use in what I'm after. From this thread: https://rathena.org/board/topic/94294-guild-pack-npc-giver-help-please/
     
    1. First script needs label to call in callsub:
     
    S_Check_IP:     return query_sql("SELECT 1 FROM `guildpack` join login on login.`last_ip` = `guildpack`.`last_ip` where login.account_id = "+ getcharid(CHAR_ID_ACCOUNT), .@tmp);  
    2. Then define IP:
     
    .@myip$ = getcharip();  
    3. Return true through callsub if IP exists in table:
     
        if (callsub(S_Check_IP))     {         mes .@name$;         mes("^616D7EIt seems I have already recorded your IP Address: ^ff0000" + .@myip$ + "^000000.");         close;     }
     
    4. If does not exist, enter new entry to previously created table:
     
    query_sql("INSERT INTO `guildpack` VALUES (NULL," + getcharid(CHAR_ID_ACCOUNT) + ",'" + escape_sql(strcharinfo(PC_NAME)) + "','" + .@myip$ + "')");  
    All in all it looks something like this: https://pastebin.com/Lk8MHMBg
     
    This can be used for get_unique_id() too if you have gepard shield.
     
    My intention was to use this in a Lottery script, so people could only purchase one ticket per week.
    After each lottery draw, the table would be truncated so everybody can buy tickets again.
  5. Upvote
    PB&JJ got a reaction from bWolfie in Bonus ReduceSkillDamage   
    Usage:
    item bonus command: bonus2 bReduceSkillDamage x,y;    // x = skill id, y = %
     
    Example: 
    {     Id: 8001     AegisName: "Custom_Card"     Name: "Custom Card"     Type: 6     Buy: 20     Weight: 10     Loc: 32      Script: <"                bonus2 bReduceSkillDamage,MO_EXTREMITYFIST,50; //Reduces Asura strikes damage by 50% "> },  
     
     
     
    you can find it on my github here.
  6. Upvote
    PB&JJ got a reaction from tedexx in Bonus ReduceSkillDamage   
    Usage:
    item bonus command: bonus2 bReduceSkillDamage x,y;    // x = skill id, y = %
     
    Example: 
    {     Id: 8001     AegisName: "Custom_Card"     Name: "Custom Card"     Type: 6     Buy: 20     Weight: 10     Loc: 32      Script: <"                bonus2 bReduceSkillDamage,MO_EXTREMITYFIST,50; //Reduces Asura strikes damage by 50% "> },  
     
     
     
    you can find it on my github here.
  7. Upvote
    PB&JJ got a reaction from Easycore in bBonusSkillLevel   
    Usage:
    item script command: 
     
    bBonusSkillLevel,x,y; // x = skill_id y = skills level to add    Example: (if you use double strafing, cast one that is two levels higher instead)
    { Id: 1715 AegisName: "Arbalest_" Name: "Arbalest" Type: 4 Buy: 48000 Weight: 1000 Atk: 90 Range: 5 Slots: 2 Job: { Archer: true Thief: true Hunter: true Rogue: true Bard: true } Loc: 34 WeaponLv: 3 EquipLv: 33 View: 11 Script: <" bonus bBonusSkillLevel,AC_DOUBLE,2; "> },  
    Note:
    I Couldn't find the proper entry point for skill levels, I figured I should look around in unit.c / clif.c. For now it's overloading battle_calc_attack. if you happen to find any bugs. or skills it doesn't work on (when final skill level <= 10), or if you have any suggestions Please let me know!
  8. Upvote
    PB&JJ got a reaction from bWolfie in bBonusSkillLevel   
    Usage:
    item script command: 
     
    bBonusSkillLevel,x,y; // x = skill_id y = skills level to add    Example: (if you use double strafing, cast one that is two levels higher instead)
    { Id: 1715 AegisName: "Arbalest_" Name: "Arbalest" Type: 4 Buy: 48000 Weight: 1000 Atk: 90 Range: 5 Slots: 2 Job: { Archer: true Thief: true Hunter: true Rogue: true Bard: true } Loc: 34 WeaponLv: 3 EquipLv: 33 View: 11 Script: <" bonus bBonusSkillLevel,AC_DOUBLE,2; "> },  
    Note:
    I Couldn't find the proper entry point for skill levels, I figured I should look around in unit.c / clif.c. For now it's overloading battle_calc_attack. if you happen to find any bugs. or skills it doesn't work on (when final skill level <= 10), or if you have any suggestions Please let me know!
  9. Upvote
    PB&JJ got a reaction from Legend in bBonusSkillLevel   
    Usage:
    item script command: 
     
    bBonusSkillLevel,x,y; // x = skill_id y = skills level to add    Example: (if you use double strafing, cast one that is two levels higher instead)
    { Id: 1715 AegisName: "Arbalest_" Name: "Arbalest" Type: 4 Buy: 48000 Weight: 1000 Atk: 90 Range: 5 Slots: 2 Job: { Archer: true Thief: true Hunter: true Rogue: true Bard: true } Loc: 34 WeaponLv: 3 EquipLv: 33 View: 11 Script: <" bonus bBonusSkillLevel,AC_DOUBLE,2; "> },  
    Note:
    I Couldn't find the proper entry point for skill levels, I figured I should look around in unit.c / clif.c. For now it's overloading battle_calc_attack. if you happen to find any bugs. or skills it doesn't work on (when final skill level <= 10), or if you have any suggestions Please let me know!
  10. Upvote
    PB&JJ got a reaction from Legend in findmob   
    morocc,154,89,6 script findmobtest 1_M_SIZ,{ input .@temp; findmob(.@test$,.@temp); for(.@i = 0; .@i < getarraysize(.@test$); .@i += 2){ dispbottom "mob spawns on map " + .@test$[.@i] + " ( " + .@test$[.@i+1] + ")"; } }  
  11. Upvote
    PB&JJ got a reaction from AnnieRuru in [Added Feature] jTynne's @go Command Alternative (.TXT Format!)   
    Isn't it better to use compare?
    (E.G: if( compare(@warp$,"pr") || @warp$ == "0") -> do.... It'll cut down your script size :-P, also its not case sensitive that way.

    try to use Temporarily npc variables as well

    .@variable$
  12. Upvote
    PB&JJ got a reaction from Patskie in [Added Feature] jTynne's @go Command Alternative (.TXT Format!)   
    Isn't it better to use compare?
    (E.G: if( compare(@warp$,"pr") || @warp$ == "0") -> do.... It'll cut down your script size :-P, also its not case sensitive that way.

    try to use Temporarily npc variables as well

    .@variable$
×
×
  • Create New...

Important Information

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