Jump to content

Heartfelt

Members
  • Posts

    35
  • Joined

  • Last visited

Everything posted by Heartfelt

  1. updates about this? did you successfully fix this?
  2. got this warning and debug : [17/May 19:10][Warning]: script:query_sql: Too many columns, discarding last 3 columns. [17/May 19:10][Debug]: Source (NPC): MVPLadder (invisible/not on a map) [17/May 19:10][Debug]: Source (NPC): MVPLadder is located in: npc/custom/mvplad.txt this is my script: //====== rAthena Script ====================================================== //= MVP ladder script //===== By: ================================================================== //= Rokimoki but edited and adapted from AnnieRuru PVP Ladder //= https://herc.ws/board/topic/18871-dota-pvp-ladder/ //= Mark Script fixed and adapted some small things //===== Current Version: ===================================================== //= 2.1 //===== Compatible With: ===================================================== //= rAthena 2020-10-20, with MySQL 8.0 //===== Description: ========================================================= //= MVP ladder store in SQL table //= Requested by DevThor //===== Additional Comments: ================================================= //= 1.0 initial version //= 2.0 added total kill count and fixed some sql bugs //= 2.1 fixed sql sorting rank //============================================================================ /* CREATE TABLE `mvpladder` ( `id` int(11) NOT NULL AUTO_INCREMENT, `char_id` int(11) unsigned NOT NULL default '0', `mob_id` INT NOT NULL, `kills` INT DEFAULT 0, PRIMARY KEY (`id`), INDEX (`char_id`), INDEX (`mob_id`), INDEX (`kills`) ) ENGINE=MyISAM AUTO_INCREMENT=1; */ //---- MvP Ladder Logic Script - script MVPLadder -1,{ OnInit: // Config .map_killannounce = 1; // announce when MVP is dead on the map where the MVP was killed : 0 - off, 1 - o .killannounce = 1; // announce when MVP is dead globally : 0 - off, 1 - on .gmnokill = 0; // GMs are not suppose to kill MVP. A GM with <this number> level or higher will do nothing. IF set to 60, GM60 and above kill any player will not get anything : 0 - off // .min_gm_menu = 90; // minimum level of GM can use the GM menu on ladder npc .showtotal = 20; // show the length of ladder. .showpage = 10; // set the views per page. .showstatue = 3; // number of statues. This number must match with the number of duplicates at the end of the script .fix_custom_sprite = false; // if your server has custom animated sprite that overlaps the sprite animation repeatedly on the statues, enable this // Config ends ------------------------------------------------------------------------------------------ // to prevent bug happen if (.gmnokill <= 0) .gmnokill = 100; sleep 1; OnTimer30000: // refresh statues every 30 seconds. Note the `char` table is unrealiable, player still need to perform certain task to save the character -> see 'save_settings' in conf\map-server.conf .@query$ = "SELECT `char`.`char_id`, `char`.`name`, `char`.`guild_id`, `char`.`class`, " + "`char`.`sex`, `char`.`hair`, `char`.`hair_color`, `char`.`clothes_color`, " + "`char`.`body`, `char`.`head_top`, `char`.`head_mid`, `char`.`head_bottom`, `char`.`robe`, " + "SUM(`mvpladder`.`kills`) as `orderKills` " + "FROM `char` RIGHT JOIN `mvpladder` ON `char`.`char_id` = `mvpladder`.`char_id` GROUP BY `char`.`char_id` ORDER BY `orderKills` DESC LIMIT " + .showstatue; .@nb = query_sql(.@query$, .@cid, .@name$, .@guild_id, .@class, .@sex$, .@hair, .@hair_color, .@clothes_color, .@body, .@head_top, .@head_mid, .@head_bottom, .@robe, .@kills); if (.fix_custom_sprite) { for (.@i = 0; .@i < .@nb; ++.@i) { setunitdata .statue[.@i +1], UNPC_HEADTOP, 0; setunitdata .statue[.@i +1], UNPC_HEADMIDDLE, 0; setunitdata .statue[.@i +1], UNPC_HEADBOTTOM, 0; setunitdata .statue[.@i +1], UNPC_ROBE, 0; } } for (.@i = 0; .@i < .@nb; ++.@i) { setunitdata .statue[.@i +1], UNPC_CLASS, .@class[.@i]; setunitdata .statue[.@i +1], UNPC_SEX, (.@sex$[.@i] == "F")? SEX_FEMALE:SEX_MALE; setunitdata .statue[.@i +1], UNPC_HAIRSTYLE, .@hair[.@i]; setunitdata .statue[.@i +1], UNPC_HAIRCOLOR, .@hair_color[.@i]; setunitdata .statue[.@i +1], UNPC_CLOTHCOLOR, .@clothes_color[.@i]; setunitdata .statue[.@i +1], UNPC_BODY2, .@body[.@i]; setunitdata .statue[.@i +1], UNPC_HEADTOP, .@head_top[.@i]; setunitdata .statue[.@i +1], UNPC_HEADMIDDLE, .@head_mid[.@i]; setunitdata .statue[.@i +1], UNPC_HEADBOTTOM, .@head_bottom[.@i]; setunitdata .statue[.@i +1], UNPC_ROBE, .@robe[.@i]; setnpcdisplay "mvp_ladder_statue#"+(.@i +1), .@name$[.@i]; .statue_name$[.@i +1] = .@name$[.@i]; .statue_guild$[.@i +1] = getguildname(.@guild_id[.@i]); .statue_kills[.@i +1] = .@kills[.@i]; } for (.@i = .@nb; .@i < .showstatue; ++.@i) setunitdata .statue[.@i +1], UNPC_CLASS, HIDDEN_WARP_NPC; initnpctimer; end; OnNPCKillEvent: // Logic to detect when a MvP is killed if (getmonsterinfo(killedrid, MOB_MVPEXP) > 0) { .@selectIfKillExistQuery$ = "SELECT char_id, mob_id, kills FROM mvpladder WHERE char_id = '" + getcharid(0) + "' AND mob_id = '" + killedrid + "';"; if (query_sql(.@selectIfKillExistQuery$) > 0) { // Exist a kill of that MVP so +1 to kill count .@updateLadderQuery$ = "UPDATE mvpladder SET kills = kills + 1 WHERE char_id = '" + getcharid(0) + "' AND mob_id = '" + killedrid + "'"; } else { // Create a new kill of specific MVP //.@updateLadderQuery$ = "INSERT INTO mvpladder (char_id, mob_id, kills) VALUES ('" + getcharid(0) + "','" + killedrid + "','1');"; .@updateLadderQuery$ = "INSERT INTO mvpladder (`char_id` , `mob_id` , `kills`) VALUES ('" + getcharid(0) + "','" + killedrid + "','1');"; } query_sql(.@updateLadderQuery$); } end; } //---- MvP Ladder Info NPC prontera,161,207,3 script MVP Manager 10279,{ .@npcname$ = strnpcinfo(0); while (1) { mes "["+ .@npcname$ +"]"; mes "Hello "+ strcharinfo(0) +"..."; mes "If you want to I can show you your MVP stats."; next; switch (select("Monthly Winner Shop","Key Shop","Most MVP killer list","Most MVP killed list","Own Information")) { mes "["+ .@npcname$ +"]"; case 1: mes "[Barter NPC]"; mes "..."; close2; callshop "MVPSHOP"; end; case 2: mes "[Barter NPC]"; mes "..."; close2; callshop "MVPPOINT"; end; case 3: .@queryKillerList$ = "SELECT t1.char_id, SUM(t1.kills) as `orderKills`, t2.name " + "FROM `mvpladder` t1 " + "INNER JOIN `char` t2 " + "ON t1.char_id = t2.char_id " + "GROUP BY t1.char_id " + "ORDER BY `orderKills` DESC " + "LIMIT " + getvariableofnpc(.showtotal, "MVPLadder") + ";"; .@nb = query_sql(.@queryKillerList$, .@charid, .@kills, .@name$); if (!.@nb) { mes "The ladder currently is empty."; next; } for (.@j = 0; .@j < .@nb; .@j += getvariableofnpc(.showpage,"MVPLadder")) { for (.@i = .@j; .@i < (getvariableofnpc(.showpage,"MVPLadder") + .@j) && .@i < .@nb; ++.@i) mes "^996600" + (.@i+1) + ": ^006699" + .@name$[.@i] + " ^00AA00[^FF0000" + .@kills[.@i] + " MvP^00AA00 killed]^000000"; next; } break; case 4: .@queryKilledList$ = "SELECT char_id, mob_id, SUM(kills) as `orderKills` " + "FROM `mvpladder` " + "GROUP BY mob_id " + "ORDER BY `orderKills` DESC " + "LIMIT " + getvariableofnpc(.showtotal, "MVPLadder") + ";"; .@nb = query_sql(.@queryKilledList$, .@charid, .@mobid, .@kills); if (!.@nb) { mes "The ladder currently is empty."; next; } for (.@j = 0; .@j < .@nb; .@j += getvariableofnpc(.showpage,"MVPLadder")) { for (.@i = .@j; .@i < (getvariableofnpc(.showpage,"MVPLadder") + .@j) && .@i < .@nb; ++.@i) { mes "^996600" + (.@i+1) + ": ^006699" + strmobinfo(1, .@mobid[.@i]) + " ^FF0000MvP ^00AA00[Killed ^FF0000" + .@kills[.@i] + " ^00AA00times]^000000"; } next; } query_sql("SELECT SUM(kills) FROM mvpladder;", .@killCount); mes "^996600==> ^006699Total MvP Kills [^FF0000" + .@killCount[0] + " ^00AA00kills]^000000"; break; case 5: .@queryOwnLadder$ = "SELECT char_id, mob_id, SUM(kills) as `orderKills` " + "FROM `mvpladder` " + "WHERE char_id = '" + getcharid(0) + "'" + "ORDER BY `orderKills` DESC;"; .@nb = query_sql(.@queryOwnLadder$, .@charid, .@mobid, .@kills); if (!.@nb) { mes "The ladder currently is empty."; next; } .@totalKillCount = 0; for (.@j = 0; .@j < .@nb; .@j += getvariableofnpc(.showpage,"MVPLadder")) { for (.@i = .@j; .@i < (getvariableofnpc(.showpage,"MVPLadder") + .@j) && .@i < .@nb; ++.@i ) { mes "^996600" + (.@i+1) + ": ^006699" + strmobinfo(1, .@mobid[.@i]) + " ^FF0000MvP ^00AA00[Killed ^FF0000" + .@kills[.@i] + " ^00AA00times]^000000"; .@totalKillCount = .@totalKillCount + .@kills[.@i]; } next; } mes "^996600==> ^006699Total Own MvP Kills [^FF0000" + .@totalKillCount + " ^00AA00kills]^000000"; break; } OnInit: setunitdata (getnpcid(0), UNPC_GROUP_ID, 19); setunittitle(getnpcid(0), "MVP Ladder"); initnpctimer; end; OnTimer500: showscript("MVP Manager"); setnpctimer 0; end; } close; } //---- MSG board NPCs - script mvp_ladder_statue -1,{ .@id = getelementofarray(getvariableofnpc(.npcgid, "MVPLadder"), getnpcid(0)); mes "^996600[TOP "+ .@id +"]"; mes "^006699Name : "+ getelementofarray(getvariableofnpc(.statue_name$, "MVPLadder"), .@id); .@guildname$ = getelementofarray(getvariableofnpc(.statue_guild$, "MVPLadder"), .@id); mes "^00AAAAGuild : "+((.@guildname$ == "null")? "^AAAAAANone": .@guildname$); mes "^00AA00Total MVP Kills : ["+ getelementofarray(getvariableofnpc(.statue_kills, "MVPLadder"), .@id) +"]"; close; OnInit: .@id = strnpcinfo(2); set getvariableofnpc(.statue[.@id], "MVPLadder"), getnpcid(0); set getvariableofnpc(.npcgid[getnpcid(0)], "MVPLadder"), .@id; end; } prontera,151,219,4 duplicate(mvp_ladder_statue) mvp_ladder_statue#1 1_F_MARIA prontera,149,222,5 duplicate(mvp_ladder_statue) mvp_ladder_statue#2 1_F_MARIA prontera,153,222,2 duplicate(mvp_ladder_statue) mvp_ladder_statue#3 1_F_MARIA prontera,151,220,4 script #top1 111,{ OnInit: initnpctimer; end; OnTimer1000: showscript("Top MVP Killer"); setnpctimer 0; end; } so i created sql table with this, which is provided in the npc script CREATE TABLE `mvpladder` ( `id` int(11) NOT NULL AUTO_INCREMENT, `char_id` int(11) unsigned NOT NULL default '0', `mob_id` INT NOT NULL, `kills` INT DEFAULT 0, PRIMARY KEY (`id`), INDEX (`char_id`), INDEX (`mob_id`), INDEX (`kills`) ) ENGINE=MyISAM AUTO_INCREMENT=1; any clue? please help thank you
  3. please help make this Jobchanger NPC will require 1 Million Zeny when a player want to rebirth to high novice //===== rAthena Script ======================================= //= Job Master //===== Description: ========================================= //= A fully functional job changer. //===== Additional Comments: ================================= //= 1.0 Initial script. [Euphy] //= 1.1 Fixed reset on Baby job change. //= 1.2 Added Expanded Super Novice support and initial Kagerou/Oboro support. //= 1.3 Kagerou/Oboro added. //= 1.4 Rebellion added. //= 1.5 Added option to disable RebirthClass. [mazvi] //= 1.6 Added option to get job related equipment on change. [Braniff] //= 1.7 Readability changes. Also added BabyExpanded and BabySummoner classes. [Jey] //= 1.8 Added option to disable Baby Novice Only but Baby Class can be Enabled [mazvi] //= 1.9 Migrate/Integrate to Global Functions Platinum Skills. [mazvi] //= 2.0 Added 4th class [Lemongrass] //============================================================ prontera,127,170,5 script Job Master 10376,{ function Get_Job_Equip; // Checks if the Player has the required level. // closes if not, returns if yes function Require_Level { if (BaseLevel < getarg(0) || JobLevel < getarg(1)) { .@blvl = getarg(0) - BaseLevel; .@jlvl = getarg(1) - JobLevel; mes "Level requirement:"; mes ((getarg(0)>1)? "^bb0000"+getarg(0)+"^000000 (^bb0000Base^000000) / ":"")+"^00bb00"+ getarg(1)+"^000000 (^00bb00Job^000000)"; mes "You need " + ((.@blvl > 0) ? "^bb0000"+.@blvl+"^000000 more base levels " + ((.@jlvl > 0) ? "and " : "") : "") + ((.@jlvl > 0) ? "^00bb00"+.@jlvl+"^000000 more job levels " : "") + "to continue."; close; } return; } // Checks if the given eac is a baby class function Is_Baby { return ((getarg(0, eaclass())&EAJL_BABY)>0); } // Checks if the player can change to third class. // Note: This does not include the level checks. function Can_Change_Third { // To change to third class you either need to be: // * Second Class // * Transcendent Second Class // * Baby Second Class if( !.ThirdClass ) return false; // Third job change disabled if( !(eaclass()&EAJL_2) ) return false; // Not second Class if( eaclass()&EAJL_THIRD ) return false; // Already Third Class if( roclass(eaclass()|EAJL_THIRD) < 0 ) return false; // Job has no third Class if( (eaclass()&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE ) return false; // Exp. Super Novice equals 3rd Cls, but has it's own case if( Is_Baby() && (!.BabyClass || !.BabyThird) ) return false; // No Baby (Third) change allowed return true; } function Can_Rebirth { // To rebirth, you need to be: // * Second Class if( !.RebirthClass ) return false; // Rebirth disabled if( !(eaclass()&EAJL_2) ) return false; // Not second Class if( eaclass()&(EAJL_UPPER|EAJL_THIRD) ) return false; // Already Rebirthed/ Third Class if( roclass(eaclass()|EAJL_UPPER) < 0 ) return false; // Job has no transcended class if( Is_Baby() && !.BabyClass ) return false; // No Baby changes allowed return true; } // Checks if the given eac is a first class function Is_First_Cls { return (getarg(0) <= EAJ_TAEKWON); } function Check_Riding { // Note: Why we should always check for Riding: // Mounts are considered as another class, which // would make this NPC bigger just to handle with // those special cases. if (checkfalcon() || checkcart() || checkriding() || ismounting()) { mes "Please remove your " + ((checkfalcon()) ? "falcon" : "") + ((checkcart()) ? "cart" : "") + ((checkriding()) ? "Peco" : "") + ((ismounting()) ? "mount" : "") + " before proceeding."; close; } return; } function Check_SkillPoints { if (.SkillPointCheck && SkillPoint) { mes "Please use all your skill points before proceeding."; close; } return; } // addJobOptions is essentially the same like // setarray .@array[getarraysize(.@array)],opt1,opt2,...; // It's just easier to read, since we're using it very often function Job_Options { .@argcount = getargcount(); .@arr_size = getarraysize(getarg(0)); for( .@i = 1; .@i < .@argcount; .@i++) { setarray getelementofarray(getarg(0), .@arr_size++),getarg(.@i); } } // Begin of the NPC mes .NPCName$; Check_Riding(); Check_SkillPoints(); // initialisation .@eac = eaclass(); .@third_possible = Can_Change_Third(); .@rebirth_possible = Can_Rebirth(); .@first_eac = .@eac&EAJ_BASEMASK; .@second_eac = .@eac&EAJ_UPPERMASK; // Note: These are already set in pc.cpp // BaseClass = roclass(.@eac&EAJ_BASEMASK) which is the players First Class // BaseJob = roclass(.@eac&EAJ_UPPERMASK) which is the players Second Class //dispbottom "Debug: eac ("+.@eac+"), third ("+.@third_possible+"), rebirth("+.@rebirth_possible+"), BaseClass ("+BaseClass+"), BaseJob ("+BaseJob+")"; // From here on the jobmaster checks the current class // and fills the the array `.@job_opt` with possible // job options for the player. if( .@rebirth_possible ) { // Rebirth option (displayed on the top of the menu) Require_Level(.Req_Rebirth[0], .Req_Rebirth[1]); Job_Options(.@job_opt, Job_Novice_High); } if( .@third_possible ) { // Third Job change (displayed below rebirth) Require_Level(.Req_Third[0], .Req_Third[1]); Job_Options(.@job_opt, roclass(.@eac|EAJL_THIRD)); } if (.SecondExpanded && (.@eac&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE && // is Super Novice !(eaclass()&EAJL_THIRD) ) { // not already Expanded SN // (Baby) Super Novice to Expanded (Baby) Super Novice if( !Is_Baby(.@eac) || (.BabyClass && .BabyExpanded) ) { // .BabyClass & .BabyExpanded must be enabled if the is a baby Require_Level(.Req_Exp_SNOVI[0], .Req_Exp_SNOVI[1]); Job_Options(.@job_opt,roclass(.@eac|EAJL_THIRD)); // Expanded SN is "third" cls } } if (.SecondExpanded && ((.@eac&(~EAJL_BABY)) == EAJ_NINJA || // is (Baby) Ninja (.@eac&(~EAJL_BABY)) == EAJ_GUNSLINGER)) { // is (Baby) Gunslinger // (Baby) Ninja to (Baby) Kagerou / Oboro // (Baby) Gunslinger to (Baby) Rebellion if( !Is_Baby(.@eac) || (.BabyClass && .BabyExpanded) ) { // .BabyClass & .BabyExpanded must be enabled if the is a baby Require_Level(.Req_Exp_NJ_GS[0], .Req_Exp_NJ_GS[1]); // Kagerou, Oboro, Rebellion are considered as a 2-1 class Job_Options(.@job_opt, roclass(.@eac|EAJL_2_1)); } } // Player is Job_Novice, Job_Novice_High or Job_Baby if (.@first_eac == EAJ_NOVICE && .@second_eac != EAJ_SUPER_NOVICE) { // MAPID_NOVICE, MAPID_SUPER_NOVICE, MAPID_NOVICE_HIGH, MAPID_BABY Require_Level(.Req_First[0], .Req_First[1]); switch(Class) { case Job_Novice: // First job change Job_Options(.@job_opt,Job_Swordman, Job_Mage, Job_Archer, Job_Acolyte, Job_Merchant, Job_Thief, Job_Super_Novice, Job_Taekwon, Job_Gunslinger, Job_Ninja); if( .BabyNovice ) Job_Options(.@job_opt, Job_Baby); break; case Job_Novice_High: // Job change after rebirth if( .LastJob && lastJob ) Job_Options(.@job_opt, roclass((eaclass(lastJob)&EAJ_BASEMASK)|EAJL_UPPER)); else Job_Options(.@job_opt, Job_Swordman_High, Job_Mage_High, Job_Archer_High, Job_Acolyte_High, Job_Merchant_High, Job_Thief_High); break; case Job_Baby: if( !.BabyClass ) break; // First job change as a baby Job_Options(.@job_opt, Job_Baby_Swordman, Job_Baby_Mage, Job_Baby_Archer,Job_Baby_Acolyte, Job_Baby_Merchant, Job_Baby_Thief); if( .BabyExpanded ) Job_Options(.@job_opt, Job_Super_Baby, Job_Baby_Taekwon, Job_Baby_Gunslinger, Job_Baby_Ninja); if( .BabySummoner ) Job_Options(.@job_opt, Job_Baby_Summoner); break; default: mes "An error has occurred."; close; } } else if( Is_First_Cls(.@eac) || // First Class Is_First_Cls(.@eac&(~EAJL_UPPER)) || // Trans. First Cls (.BabyClass && Is_First_Cls(.@eac&(~EAJL_BABY))) ) { // Baby First Cls // Player is First Class (not Novice) // most jobs should have two options here (2-1 and 2-2) .@class1 = roclass(.@eac|EAJL_2_1); // 2-1 .@class2 = roclass(.@eac|EAJL_2_2); // 2-2 // dispbottom "Debug: Classes: class1 ("+.@class1+"), class2 ("+.@class2+")"; if(.LastJob && lastJob && (.@eac&EAJL_UPPER)) { // Player is rebirth Cls and linear class changes are enforced Require_Level(.Req_Second[0], .Req_Second[1]); Job_Options(.@job_opt, lastJob + Job_Novice_High); } else { // Class is not enforced, player can decide. if( .@class1 > 0 ) { // 2-1 Require_Level(.Req_Second[0], .Req_Second[1]); Job_Options(.@job_opt, .@class1); } if( .@class2 > 0 ) { // 2-2 Require_Level(.Req_Second[0], .Req_Second[1]); Job_Options(.@job_opt, .@class2); } } } // Displaying the Job Menu defined by .@job_opt. // .@job_opt should not be changed below this line. function Job_Menu; Job_Menu(.@job_opt); close; // Displays the job menu function Job_Menu { // getarg(0) is the .@job_opt array holding all available job changes. function Confirm_Change; while(true) { .@opt_cnt = getarraysize(getarg(0)); if( .@opt_cnt <= 0 ) { mes "No more jobs are available."; close; } .@selected = 0; // Just a single job class given, no select needed if (.@opt_cnt > 1) { // Multiple job classes given. Select one and save it to .@class // After that confirm .@class mes "Select a job."; .@menu$ = ""; for (.@i = 0; .@i < .@opt_cnt; .@i++) { if( getelementofarray(getarg(0), .@i) == Job_Novice_High) .@jobname$ = "^0055FFRebirth^000000"; else .@jobname$ = jobname(getelementofarray(getarg(0), .@i)); .@menu$ = .@menu$ + " ~ " + .@jobname$ + ":"; } .@menu$ = .@menu$+" ~ ^777777Cancel^000000"; .@selected = select(.@menu$) - 1; if( .@selected < 0 || .@selected >= .@opt_cnt ) close; next; mes .NPCName$; } .@class = getelementofarray(getarg(0), .@selected); if ((.@class == Job_Super_Novice || .@class == Job_Super_Baby) && BaseLevel < .SNovice) { // Special Level Requirement because Super Novice and // Super Baby can both be selected in one of the first class // changes. That's why the Level Requirement is after and not before // the selection. mes "A base level of " + .SNovice + " is required to turn into a " + jobname(.@class) + "."; return; } // Confirm the Class Confirm_Change(.@class, .@opt_cnt > 1); next; mes .NPCName$; } return; } // Executes the actual jobchange and closes. function Job_Change { .@previous_class = Class; .@to_cls = getarg(0); next; mes .NPCName$; mes "You are now " + callfunc("F_InsertArticle", jobname(.@to_cls)) + "!"; if (.@to_cls == Job_Novice_High && .LastJob) lastJob = Class; // Saves the lastJob for rebirth jobchange .@to_cls; if (.@to_cls == Job_Novice_High) resetlvl(1); else if (.@to_cls == Job_Baby) { resetstatus; resetskill; set SkillPoint,0; } specialeffect2 EF_ANGEL2; specialeffect2 EF_ELECTRIC; if (.@previous_class != Class) { if (.Platinum) callfunc "F_GetPlatinumSkills"; if (.GetJobEquip) Get_Job_Equip(); } close; // Always closes after the change } function Confirm_Change { // Player confirms he want to change into .@class .@class = getarg(0, -1); .@back = getarg(1, false); if( .@class < 0 || eaclass(.@class) == -1 ) { mes "Unknown Class Error."; close; } mes "Do you want to change into ^0055FF"+jobname(.@class)+"^000000 class?"; .@job_option$ = " ~ Change into ^0055FF"+jobname(.@class)+"^000000 class"; if( .@class == Job_Novice_High) .@job_option$ = " ~ ^0055FFRebirth^000000"; if (select(.@job_option$+": ~ ^777777" + ((.@back) ?"Go back" : "Cancel") + "^000000") == 1) { Job_Change(.@class); } if (!.@back) close; // "Cancel" pressed return; } // Function which gives a job related item to the player // the items are the rewards from the original job change quests function Get_Job_Equip { // Note: The item is dropping, when the player can't hold it. // But that's better than not giving the item at all. .@eac = eaclass(); if( .@eac&EAJL_THIRD ) { // Third Class Items getitem 2795,1; // Green Apple Ring for every 3rd Class switch(BaseJob) { // BaseJob of Third Cls // For Normal Third, Baby Third and Transcended Third Cls case Job_Knight: getitem 5746,1; break; // Rune Circlet [1] case Job_Wizard: getitem 5753,1; break; // Magic Stone Hat [1] case Job_Hunter: getitem 5748,1; break; // Sniper Goggle [1] case Job_Priest: getitem 5747,1; break; // Mitra [1] case Job_Blacksmith: getitem 5749,1; break; // Driver Band [1] case Job_Assassin: getitem 5755,1; break; // Silent Executor [1] case Job_Crusader: getitem 5757,1; break; // Dip Schmidt Helm [1] case Job_Sage: getitem 5756,1; break; // Wind Whisper [1] case Job_Bard: getitem 5751,1; break; // Maestro Song's Hat [1] case Job_Dancer: getitem 5758,1; break; // Dying Swan [1] case Job_Monk: getitem 5754,1; break; // Blazing Soul [1] case Job_Alchemist: getitem 5752,1; break; // Midas Whisper[1] case Job_Rogue: getitem 5750,1; // Shadow Handicraft [1] getitem 6121,1; // Makeover Brush getitem 6122,1; break; // Paint Brush } } else if (.@eac&EAJL_2) { // Second Class (And not Third Class) switch(BaseJob) { // Second Class case Job_Knight: getitem 1163,1; break; // Claymore [0] case Job_Priest: getitem 1522,1; break; // Stunner [0] case Job_Wizard: getitem 1617,1; break; // Survivor's Rod [0] case Job_Blacksmith: getitem 1360,1; break; // Two-Handed-Axe [1] case Job_Hunter: getitem 1718,1; break; // Hunter Bow [0] case Job_Assassin: getitem 1254,1; break; // Jamadhar [0] case Job_Crusader: getitem 1410,1; break; // Lance [0] case Job_Monk: getitem 1807,1; break; // Fist [0] case Job_Sage: getitem 1550,1; break; // Book [3] case Job_Rogue: getitem 1222,1; break; // Damascus [1] case Job_Alchemist: getitem 1126,1; break; // Saber [2] case Job_Bard: getitem 1907,1; break; // Guitar [0] case Job_Dancer: getitem 1960,1; break; // Whip [1] case Job_Super_Novice: getitem 1208,1; break; // Main Gauche [4] case Job_Star_Gladiator: getitem 1550,1; break; // Book [3] case Job_Soul_Linker: getitem 1617,1; break; // Survivor's Rod [0] } } else { // Neither Second or Third Cls // => First Cls or not covered by the switch switch(BaseClass) { // First Class case Job_Swordman: getitem 1110,1; break; // Blade [4] case Job_Mage: getitem 1607,1; break; // Rod [4] case Job_Archer: getitem 1704,1; break; // Composite Bow [4] case Job_Acolyte: getitem 1519,1; break; // Mace [4] case Job_Merchant: getitem 1351,1; break; // Axe [4] case Job_Thief: getitem 1210,1; break; // Main Gauche [4] case Job_Gunslinger: getitem 13101,1; break; // Six Shooter [2] case Job_Ninja: getitem 13010,1; break; // Asura [2] } } return; } OnInit: // Initialisation, do not edit these .NPCName$ = "[Job Master]"; // Settings .ThirdClass = false; // Enable third classes? .RebirthClass = true; // Enable rebirth classes? .SecondExpanded = false; // Enable new expanded second classes: Ex. Super Novice, Kagerou/Oboro, Rebellion? .BabyNovice = true; // Enable Baby novice classes? Disable it if you like player must have parent to get job baby. .BabyClass = true; // Enable Baby classes? .BabyThird = false; // Enable Baby third classes? .BabyExpanded = false; // Enable Baby Expanded classes: Ex. Baby Ninja, Baby Taekwon, etc. .BabySummoner = false; // Enable Baby Summoner? .LastJob = true; // Enforce linear class changes? .SkillPointCheck = true; // Force player to use up all skill points? .Platinum = false; // Get platinum skills automatically? .GetJobEquip = false; // Get job equipment (mostly weapons) on job change? // Level Requirements setarray .Req_First[0],1,10; // Minimum base level, job level to turn into 1st class setarray .Req_Second[0],1,40; // Minimum base level, job level to turn into 2nd class setarray .Req_Rebirth[0],99,50; // Minimum base level, job level to rebirth setarray .Req_Third[0],99,50; // Minimum base level, job level to change to third class setarray .Req_Exp_NJ_GS[0],99,70; // Minimum base level, job level to turn into Expanded Ninja and Gunslinger setarray .Req_Exp_SNOVI[0],99,99; // Minimum base level, job level to turn into Expanded Super Novice .SNovice = 45; // Minimum base level to turn into Super Novice // Setting adjustments by PACKETVER if( PACKETVER < 20161207 ) { if( .BabyExpanded ) debugmes "jobmaster: BabyExpanded is disabled due to outdated PACKETVER."; if( .BabySummoner ) debugmes "jobmaster: BabySummoner is disabled due to outdated PACKETVER."; .BabyExpanded = false; .BabySummoner = false; } setunitdata (getnpcid(0), UNPC_GROUP_ID, 2); setunittitle(getnpcid(0), "Venris NPC"); initnpctimer; end; OnTimer500: showscript("Job Master"); setnpctimer 0; end; } Thanks
  4. hello, as the tile says pet and homunc autofeed is automatically set OFF when logged in i already set it always ON at pet.conf and homunc.conf and i think i already put the right lua files and the pet.db configuration on the chat box it shows this is there any way to fix this? thank you
  5. i want to use this NPC i found on rathena on my server. the use of this NPC is to transfer cash points or zeny to other players prontera,45,99,2 script Transfer Angel 437,{ start: mes "[Transfer Angel]"; mes "Hello " + strcharinfo(0) + ","; mes "What can I do for you?"; next; menu "Cash Transfer",cashi,"Zeny Transfer",zenyi,"Leave",L_Leave; cashi: mes "[Transfer Angel]"; if (#CASHPOINTS==0){ mes "Sorry but you don't have any Cash Points."; next; goto start; } mes "Please enter the char's name:"; mes "(You have " + #CASHPOINTS + " Cash Points)"; input .@name$; query_sql "SELECT `account_id`,`name` FROM `char` WHERE `name` = '"+escape_sql(.@name$)+"'", .@account_id,.@name$; next; if (!.@account_id) { mes "[Transfer Angel]"; mes "^FF0000Char name does not exist.^000000"; close; } else if (.@account_id==getcharid(3)) { mes "[Transfer Angel]"; mes "Why would you send points to yourself?"; next; goto cashi; } cashsend: mes "[Transfer Angel]"; mes "How many Cash Points to send?"; mes "You'r sending to: ^0000FF"+.@name$+"^000000"; mes "(You have: " + #CASHPOINTS + " Cash Points)"; mes "(Type 0 to cancel)"; input .@amt; if (.@amt == 0) close; next; if (.@amt < 1) { mes "[Transfer Angel]"; mes "^0000FFPlease enter a positive number^000000."; next; goto cashsend; } else if (.@amt > #CASHPOINTS) { mes "[Transfer Angel]"; mes "^0000FFYou do not have that many Cash Points.^000000 The max you can send is: "+#CASHPOINTS; next; goto cashsend; } mes "[Transfer Angel]"; mes "Send "+.@amt+" Cash Points to ^0000FF"+.@name$+"^000000?"; menu "Yes",yy,"Back to Menu",nn; yy: // save their Account ID and name set .@AID, playerattached(); set .@send_name$, strcharinfo(0); // subtract their Cash Points set #CASHPOINTS, #CASHPOINTS - .@amt; // transfer the Cash Points if (attachrid(.@account_id)) { // if they are logged in set #CASHPOINTS, #CASHPOINTS + .@amt; dispbottom .@send_name$ + " sent you " + .@amt + " Cash Points! Total = " + #CASHPOINTS; } else { // if they are offline, query_sql if( query_sql("SELECT account_id FROM global_reg_value WHERE str='#CASHPOINTS' AND account_id="+.@account_id, .@account_id) ) query_sql "UPDATE global_reg_value SET `value`=`value`+"+.@amt+" WHERE str='#CASHPOINTS' AND account_id="+.@account_id; else query_sql "INSERT INTO global_reg_value (str,`value`,`type`,account_id) VALUES ('#CASHPOINTS',"+.@amt+",2,"+.@account_id+")"; } attachrid(.@AID); next; mes "[Transfer Angel]"; mes "Transfer successful!"; next; goto start; L_Leave: mes "[Transfer Angel]"; mes "Have a nice day"; close; zenyi: mes "[Transfer Angel]"; if (zeny==0){ mes "Sorry but you don't have any Zeny."; next; goto start; } mes "Please enter the char's name:"; input .@name$; query_sql "SELECT `char_id`,`account_id`,`name` FROM `char` WHERE `name` = '"+escape_sql(.@name$)+"'", .@char_id,.@account_id,.@name$; next; if (!.@account_id) { mes "[Transfer Angel]"; mes "^FF0000Char name does not exist.^000000"; close; } else if (.@char_id==getcharid(0)) { mes "[Transfer Angel]"; mes "Why would you send zeny to yourself?"; next; goto zenyi; } zenysend: mes "[Transfer Angel]"; mes "How much Zeny to send?"; mes "You'r sending to: ^0000FF"+.@name$+"^000000"; mes "(You have: "+Zeny+" Zeny)"; mes "(Type 0 to cancel)"; input .@amt; if (.@amt == 0) close; next; if (.@amt < 1) { mes "[Transfer Angel]"; mes "^0000FFPlease enter a positive number.^000000"; next; goto zenysend; } else if (.@amt > Zeny) { mes "[Transfer Angel]"; mes "^0000FFYou do not have that much zeny.^000000 The max you can send is: "+Zeny; next; goto zenysend; } mes "[Transfer Angel]"; mes "Send "+.@amt+" Zeny to ^0000FF"+.@name$+"^000000?"; menu "Yes",yy2,"Back to Menu",nn; nn: next; goto start; yy2: // save their Account ID and name set .@AID, playerattached(); set .@send_name$, strcharinfo(0); // subtract their zeny set Zeny, Zeny - .@amt; // transfer the money if (attachrid(.@account_id)) { if (getcharid(0)==.@char_id) { // if they are logged in, on the right char set Zeny, Zeny + .@amt; dispbottom .@send_name$ + " sent you " + .@amt + " zeny!"; } else { // logged in, but on wrong char query_sql "UPDATE `char` SET `zeny`=`zeny`+'"+.@amt+"' WHERE `char_id`='"+.@char_id+"'"; } } else { // if they are offline, query_sql query_sql "UPDATE `char` SET `zeny`=`zeny`+'"+.@amt+"' WHERE `char_id`='"+.@char_id+"'"; } attachrid(.@AID); next; mes "[Transfer Angel]"; mes "Transfer successful!"; next; goto start; } however this part is not working, when i send it to an offline player there is no "global_reg_value" in my sql table, instead i have "acc_reg_num" that stores the Cashpoint of each account here is how the "acc_reg_num table looks like so,which part do i need to modify? thanks in advance for helping
  6. I found this on herc, but it seems like it doenst work on rathena can someone give a working version of this script?? this is the original script i got from herc // --- //= Cash Point Manager v1.0 [Rokimoki] // * Add Cash Points // * Delete Cash Points // * Watch Cash Points // * Notify the player if an admin has added/deleted some cash to you. // * If the player is online it will tell which GM did. // * If the player is NOT online will show a notification when logged in but will not tell the GM who did it. // * Logs system. Must be 'log_npc: true' in conf/map/logs.con file. // -> If somebody put wrong password in whisp system. // -> If add/delete cash points. // --- //= This works if you are online or not, if online don't use SQL if offline use SQL. // --- //= v2.0 [Rokimoki] // * Recycled this old script and adapted to Hercules database // * Transtaled to English // --- - script donations -1,{ OnWhisperGlobal: if (getgmlevel() < 90) { // If you are not admin just tell you how many cash you have. dispbottom "Your have: [" + #CASHPOINTS + "] CashPoints."; end; } // End if if (strcmp(@whispervar0$,"yourpassword") != 0) { // Password system, change 'yourpassword' for any password you want logmes "User: " +strcharinfo(0) +" with account_id: " +getcharid(3) +" typed a wrong password, he wrote: " +@whispervar0$; // Just for watch if bruteforcing or something end; } // End if deletearray .@username$[0], 128; // Debug deletearray .@accid[0], 128; set .@npcName$, "[^0000FFCashPoint Manager^000000]"; mes .@npcName$; mes "Hi, I am your assistant, tell me what you need please..."; next; switch (select("Add Cash Points:Delete Cash Points:Watch Cash Points:End")) { case 1: // Add cash points callfunc("CashPoints",1); break; case 2: // Delete cash points callfunc("CashPoints",2); break; case 3: // Watch cash points callfunc("CashPoints",3); break; case 4: // Close mes "Good bye..."; break; } // End switch close; OnPCLoginEvent: // Offline notifications if (#CASHPOINTS < lastCash) dispbottom "Some administrator deleted some CashPoints, current balance: [" + #CASHPOINTS +"], before: [" + lastCash + "]"; else if (#CASHPOINTS > lastCash) dispbottom "Some administrator added some CashPoints, current balance: [" + #CASHPOINTS +"], before: [" + lastCash + "]"; set lastCash, #CASHPOINTS; end; } // End Script function script CashPoints { mes .@npcName$; mes "I need to ask you something..."; next; mes .@npcName$; if (select("Select by character name:Select by login username") == 1) { mes "Input character name: "; next; input .@charName$; query_sql "SELECT `account_id` FROM `char` WHERE `name` = '" +escape_sql(.@charName$) +"'", .@accid[0]; } else { mes "Input login username: "; next; input .@loginName$; query_sql "SELECT `account_id` FROM `login` WHERE `userid` = '" +escape_sql(.@loginName$) +"'", .@accid[0]; } // End if if (!.@accid[0]) { mes "Invalid information, error occurred: account or character not found."; close; } // End if if (getarg(0) == 3) { // Watch Cash Points if (isloggedin(.@accid[0])) { // If player is online // Save GM information set .@gm$, strcharinfo(0); set .@id, getcharid(3); detachrid; // Attach player in this script attachrid(.@accid[0]); set .@cash, #CASHPOINTS; // Save Cash Points amount detachrid; attachrid(.@id); mes .@npcName$; mes "This player has: [^FF0000" +.@cash +"^000000] Cash Points."; } else { // If offline query_sql "SELECT `value` FROM `acc_reg_num_db` WHERE `key` = '#CASHPOINTS' AND `account_id` = " +.@accid[0], .@value[0]; // Save Cash Points amount if (!.@value[0]) mes "He has [^FF00000^000000] Cash Points."; // 0 cash else mes "He has [^FF0000" +.@value[0] +"^000000] Cash Points."; // if he has cash } // End if close; } // End if mes .@npcName$; mes "Input Cash Point amount, range: 1~100"; // Change here too if you want to show proper information next; input .@amount, -1000, 1000; // Debug if (.@amount < 1 || .@amount > 100) { // Define in this if the amount you want to limit (just the right part) mes .@npcName$; mes "Invalid amount, input in the proper range told."; close; } // End if if (isloggedin(.@accid[0])) { // If player is online // Save GM information set .@gm$, strcharinfo(0); set .@id, getcharid(3); detachrid; // Attach player attachrid(.@accid[0]); set .@cash, #CASHPOINTS; // Save current cash if (getarg(0) == 1) { // Add cash set #CASHPOINTS, #CASHPOINTS + .@amount; // Add cash dispbottom "This admin: [" + .@gm$ +"] added: " +.@amount +" cash points, current balance: [" +#CASHPOINTS + "]"; // Online notification } else if (getarg(0) == 2) { // Delete cash if (.@cash <= 0) { detachrid; attachrid(.@id); mes .@npcName$; mes "You can not delete cash points, this player has no cash points."; close; } else if (.@cash - .@amount < 0) { detachrid; attachrid(.@id); mes .@npcName$; mes "You can not delete more cash than he already has, you are allowed to remove: [^FF0000" +.@cash +"^000000] cash points."; close; } // End if set #CASHPOINTS, #CASHPOINTS - .@amount; // Delete cash dispbottom "This admin [" + .@gm$ +"] deleted: " +.@amount +" cash points, current balance: " +#CASHPOINTS; // Online notification set .@action, 1; // Cash deleted flag } // End if detachrid; attachrid(.@id); } else { // If offline query_sql "SELECT `key` FROM `acc_reg_num_db` WHERE `account_id` = " + .@accid[0], .@username$[0]; // check current cash if (.@username$[0] != "#CASHPOINTS") { // If empty, never had Cash Points if (getarg(0) == 1) { // add cash query_sql "INSERT INTO `acc_reg_num_db`(`account_id`, `key`, `index`, `value`) VALUES ('" + .@accid[0] + "','#CASHPOINTS','0','" + .@amount + "')"; // create the data } else { // delete cash mes .@npcName$; mes "You can not delete cash points, this player has no cash points."; close; } // End if } else { // Player had or has Cash Points if (getarg(0) == 1) { // add cash query_sql "UPDATE `acc_reg_num_db` SET `value` = `value` + '" +.@amount +"' WHERE `key` = '#CASHPOINTS' and `account_id` = '" +.@accid[0] +"'"; // update cash } else { // delete cash query_sql "SELECT `value` FROM `acc_reg_num_db` WHERE `key` = '#CASHPOINTS' and `account_id` = " +.@accid[0], .@value[0]; // check current cash mes .@npcName$; if (.@value[0] <= 0) { mes "You can not delete cash points, this player has no cash points."; close; } else if (.@value[0] - .@amount < 0) { mes "You can not delete more cash than he already has, you are allowed to remove: [^FF0000" + .@value[0] + "^000000] cash points."; close; } // End if query_sql "UPDATE `acc_reg_num_db` SET `value` = `value` - '" + .@amount + "' WHERE `key` = '#CASHPOINTS' and `account_id` = '" + .@accid[0] + "'"; set .@action, 1; // Cash deleted flag } // End if } // End if } // End if // Saving logs if (!.@action) logmes "User: " + strcharinfo(0) + " with account_id: " + getcharid(3) + " added " + .@amount +" Cash Points to: " + .@accid[0]; else logmes "User: " + strcharinfo(0) + " with account_id: " + getcharid(3) + " removed " + .@amount +" Cash Points to: " + .@accid[0]; mes "Cash Points successfully sent, when the players log in will receive a notification, thanks for using this service."; return; } // End function Thanks in advance!
  7. is there any way to fix this error sir? @crazyarashi
  8. i just installed grf editor on my laptop. this one i used on my Desktop and completely works fine but on my laptop an error message pop up everytime i launch the app after i close the error message pop up the grf editor runs anyone knows why? and how to fix this issue? thx
  9. prontera,156,178,5 script ldfhsdfkljs 100,{ mes "do you want to enchant your equipment ?"; next; .@s = select( .menu$ ) -1; if ( !getequipisequiped( .const_equip[.@s] ) || .const_equip[.@s] == EQI_HAND_L && getiteminfo( getequipid( EQI_HAND_L ),2 ) != 5 ) { mes "you did not equip an "+ .menu_name$[.@s] +" at the moment"; close; } .@id = getequipid( .const_equip[.@s] ); .@ref = getequiprefinerycnt( .const_equip[.@s] ); .@card1 = getequipcardid( .const_equip[.@s], 0 ); .@card2 = getequipcardid( .const_equip[.@s], 1 ); .@card3 = getequipcardid( .const_equip[.@s], 2 ); .@card4 = getequipcardid( .const_equip[.@s], 3 ); if ( .@card1 == 255 || .@card1 == 254 ) { mes "I can't enchant a signed equipment"; close; } if ( .@card4 ) { mes "this armor has already enchanted"; close; } .@rand = rand(.totalchance); while ( ( .@rand = .@rand - .rate[.@r] ) >= 0 ) .@r++; .@o = rand(0,5); // orb of str/int/dex .... delitem2 .@id, 1,1, .@ref, 0, .@card1, .@card2, .@card3, 0; getitem2 .@id, 1,1, .@ref, 0, .@card1, .@card2, .@card3, 4700 + .@o * 10 + .@r; equip .@id; close; OnInit: setarray .rate, 55,50,45,40,35; // rate of getting +1 is 55%, +2 is 50% .... +10 is 10% ... setarray .const_equip, EQI_ARMOR, EQI_HAND_L, EQI_GARMENT, EQI_SHOES; setarray .menu_name$, "Armor", "Shield", "Garment", "Shoes"; .menu$ = implode( .menu_name$,":" ); while ( .@i < 10 ) { .totalchance = .totalchance + .rate[.@i]; .@i++; } end; } as the title says, i want to make this script only for enchanting upper costume headgear also i want to make it only maximum to +3 Attribute thanks
  10. the thing is, the total aspd gained with this stats 153 AGI and 127 Dex is not accurate. any idea on why?
  11. why does icepick {1} doesn't work with modifier card such as strouf card / hydra card? my server is pre-renewal. does anyone have any kind of formula or calculator for this? thanks
  12. yes its pre renewal sir, i use gm account to match the status only, thats why its more than 100
  13. i found a little bug here Im using Sniper job 99 70 level it seems like this status doesn't give the correct number of ASPD with 153 AGI and 127 Dex it should be 187 ASPD i dont use any other aspd % bonus eqiupment, this is pure from agi and dex stat only it appears that the flee is not accurate as well, it should be 254 any idea? thanks
  14. hello everyone i have a costume in my ragnarok server using this item script, to make wearer apprearance become 3rd job if(roclass(eaclass()|EAJL_UPPER)) changebase BaseJob; but it does not work for ninja and gunslinger how can i make it work for ninja to look like kagerou / oboro? and gunslinger to look like rebellion ? Thanks in advance
  15. can somebody help me explain what caused this error? THANKS
  16. is it possible to give 1 second delay on /sit usage? and is it possible to give delay to /sit after using a skill? thanks
  17. As the title says. how can i use SCF_NO_SAVE to make a certain skill status gone when logged out? Thanks
  18. i need a script that makes someone that use weapon (anykind of weapon) and armor (any kind of armor) will be teleported to save point instantly when he/she try to go to izlude city thank you
  19. i need a script that will announce it when a player gets a card from a monster but i cant use the conf because my drop card is 0,5 % so i just want to make it specific to cards only
  20. i want to edit the message in this error box that says "cannot init d3d or GRF File has problem" i want it to say other words instead how can i do this ? thanks
  21. how to fix hateffect being visible when character using skill hide/cloaking? but some of them are fine for example HAT_EF_DOUBLEGUMGANG is visible when using cloaking but HAT_EF_Blessing_Of_Angels is just fine, its not visible when cloaking please help thx
  22. thanks for replying sir i'd like to know how to do it sir? i've been receiving error so many times trying to get it done ?
  23. i want to change this auto event to event only start when GM want to start it this is the script - script TownInvasion -1,{ OnClock0000: OnClock1130: OnClock1630: OnClock2230: for(.@i = 0; .@i < 1; .@i++) { //Spawn on 4 towns .Town_Invade$ = .Town$[rand(getarraysize(.Town$))]; announce .Town_Invade$+" Guard: Help us! Our town is being invaded by Monster! Please Help us now!",bc_blue|bc_all; sleep 10000; announce .Town_Invade$+" Guard: Help us! Smash their Heads using your Weapon!!!",bc_blue|bc_all; sleep 8000; announce .Town_Invade$+" Guard: Come here!! Bring warrior! Kill these monsters!",bc_blue|bc_all; for(.@ix = 0; .@ix < 30; .@ix++) { //MvP spawner monster .Town_Invade$,0,0,"--ja--",.MvP[rand(getarraysize(.MvP))],1,strnpcinfo(1)+"::OnInvadeDeath"; } for(.@iy = 0; .@iy < 10; .@iy++) { //Mob spawner monster .Town_Invade$,0,0,"--ja--",-1,1,strnpcinfo(1)+"::OnMobsDeath"; } } end; OnInvadeDeath: .@RandMvP = rand(getarraysize(.Prize)); getitem .Prize[.@RandMvP],.PAmt[.@RandMvP]; end; OnMobsDeath: .@RandMob = rand(getarraysize(.Prize2)); getitem .Prize2[.@RandMob],.PAmt2[.@RandMob]; end; OnInit: //Towns to Invade setarray .Town$[0],"prontera","izlude","geffen","payon"; //MvPs to summon setarray .MvP[0],1196,1197,1483,1778; //Prize to give MVP setarray .Prize[0],7929; setarray .PAmt[0],10; //Prize to give Mobs setarray .Prize2[0],7929; setarray .PAmt2[0],10; end; } please help thanks a lot
  24. - Id: 19266 AegisName: Survive_Circlet_ Name: Survivor's Circlet Type: Armor Weight: 500 Defense: 10 Slots: 1 Locations: Head_Top: true EquipLevelMin: 1 Refineable: true View: 1220 Script: | how can i add 15% chance of gaining 20% of magic attack for 3 seconds every time the wearer receive any damage? please help thanks
×
×
  • Create New...