Jump to content

Capuche

Developer
  • Posts

    2407
  • Joined

  • Last visited

  • Days Won

    52

Everything posted by Capuche

  1. Like this? The purpose was to exchange a costume in my inventory vs some items setarray .costume_id0, 20000, 20001;// Item ID of the item in my inventory setarray .item_exchangeID, 7539; // item ID gained - you can add more ID <item ID>, <item ID>,... setarray .item_count, 10; // item count gained - ( count of the item /element of array of .item_exchangeID )
  2. yes Onendevent: if(.Event) announce "The Poring Summon Event is now over!",bc_all; killmonster .Map$,"All"; set .Event,0; set .SpecialPorings[1],0; set .NormalPorings[1],0; close; change close to end here case 6: mes "Ending the event now..."; donpcevent strnpcinfo(0) +"::Onendevent"; } add a close after the donpcevent
  3. It may be because of your big delay. gettimetick(2) is in secs so your delay 300000 is in secs. 300000 secs = 5000 mins ~ 4 days 180000 secs = 3000 mins ~ 2 days
  4. OnMinute17: set .Event,1; ... announce "Special Porings: " + .SpecialPorings,bc_all; announce "Normal Porings: " + .NormalPorings,bc_all; close; when there is no player attached, close is depreciated I suggest case 5: mes "Starting the event now..."; donpcevent strnpcinfo(0) +"::Onstartevent"; close; case 6: mes "Ending the event now..."; donpcevent strnpcinfo(0) +"::Onendevent"; } OnMinute17: if ( .Event ) donpcevent strnpcinfo(0) +"::Onendevent";// stop the event if already on donpcevent strnpcinfo(0) +"::Onstartevent"; end; Onstartevent: set .Event,1; monster .Map$,0,0,"Poring",1725,.SpecialPorings,"Poring Summoner::OnSpecialKill"; monster .Map$,0,0,"Poring",1725,.NormalPorings,"Poring Summoner::OnNormalKill"; set .SpecialPorings[1],.SpecialPorings; set .NormalPorings[1],.NormalPorings; announce "The Poring Event has begun!",bc_all; announce "Location: " + .Map$,bc_all; announce "Special Porings: " + .SpecialPorings,bc_all; announce "Normal Porings: " + .NormalPorings,bc_all; end; - EndEvent: - Onendvent: if(.Event) announce "The Poring Summon Event is now over!",bc_all; killmonster .Map$,"All"; set .Event,0; set .SpecialPorings[1],0; set .NormalPorings[1],0; - close; + end;
  5. I guess you tested with a new guild member. The new member must relog to save the data in guild member database (otherwise he doesn't exist yet) and the guild leader must relog too to update his guild member temporary variables. resume when you invite a new member : new guild member must relog guild leader relog
  6. - script welcome_on_my_map -1,{ OnPCLoadMapEvent: .@map$ = strcharinfo(3); while( .@i < .size_specialmap && .@map$ != .special_map$[.@i] ) .@i++; if ( .@i == .size_specialmap || #variable_firstmap & ( 1 << .@i ) ) end; query_sql "select max(`value`) from global_reg_value where `str` = '#variable_firstmap' and `account_id` in ( select `account_id` from `login` where `last_ip` = ( select `last_ip` from `login` where `account_id` = "+ getcharid(3) +" ) )", .@tmp;// null convert to 0 by serv if ( .@tmp & ( 1 << .@i ) == 0 ) { #variable_firstmap = #variable_firstmap | ( 1 << .@i ); query_sql "insert into global_reg_value (`char_id`, `str`, `value`, `type`, `account_id`) select 0, '#variable_firstmap', '"+ #variable_firstmap +"', 2, `account_id` from `login` where `account_id` in ( select `account_id` from `login` where `last_ip` = ( select `last_ip` from `login` where `account_id` = "+ getcharid(3) +" ) ) on duplicate key update value = '"+ #variable_firstmap +"'"; getexp .base_exp_gained[.@i], .job_exp_gained[.@i];// base exp, job exp gained dispbottom "You got "+ .base_exp_gained[.@i] +" base exp and "+ .job_exp_gained[.@i] +" job exp."; } end; Oninit:// setting setarray .special_map$, "payon","geffen";// your map exp reward setarray .base_exp_gained, 100, 100;// base exp given by map (payon, geffen..) setarray .job_exp_gained, 100, 100;// job exp given by map (payon, geffen..) // others .size_specialmap = getarraysize( .special_map$ ); while( .@i < .size_specialmap ) { setmapflag .special_map$[.@i], mf_loadevent; .@i++; } }
  7. in you pvp script add the label OnAgitStart + hideonnpc (hide the npc when the woe start) and OnAgitEnd + hideoffnpc (unhide) sample: OnAgitstart: hideonnpc strnpcinfo(0); end; OnAgitEnd: hideoffnpc strnpcinfo(0); end;
  8. // Rewards per castle. // -- when given directly: <itemID>,<amount>{,<itemID>,<amount>,...} // -- via mail (option 2): <itemID>,<amount>,<Zeny> setarray .Reward[0],14001,1; here you set the item reward. All guild which own a castle will get the same reward sample: setarray .Reward[0],501,1,502,2;// x1 red potion, x2 orange potion // ----------------------------------------------------------- // Reward options. // ----------------------------------------------------------- // [1] Enable rewards. // [2] Mail all rewards. // - If not set, players receive items in their inventory. // - Only ONE item can be sent via mail, plus Zeny. // - Note that offline players do NOT receive rewards. // [4] Only reward Guild Masters. // - If not set, all guild members are rewarded. // - If mailing is enabled (option 2), offline Guild Masters WILL receive rewards. // [8] Duplicate IP check. // - Members in a guild with the same IP address are not rewarded. // - If Guild Masters is enabled (option 4), this feature is not used. // ----------------------------------------------------------- // Combine values as needed (e.g. 1|8 = 1+8 = 9). set .Options, 1|8; here you set the reward options. It use bitmask value that means you must combine the value to enable several option sample: set .Options, 1|8; option 1 and 8 are enable option 1 : [1] Enable rewards. option 8 : [8] Duplicate IP check.- Members in a guild with the same IP address are not rewarded. - If Guild Masters is enabled (option 4), this feature is not used.
  9. well it depends on who you want to warp: all guild which participated at the woe : then you need to save the guild id of each guild which enter (for example) on your woe castle and make a loop with warpguild - warpguild "your pvp map",<x>,<y>,<guild_id>; all guild on the woe castle at the end of the woe : you can use mapwarp
  10. you mean at every 30 (1:30, 2:30, 3:30 etc..) the event start ? Then replace OnClock0030: OnClock0130: OnClock0230: OnClock0330: OnClock0430: OnClock0530: OnClock0630: OnClock0730: OnClock0830: OnClock0930: OnClock1030: OnClock1130: by OnMinute30:// start at every 30 mins of an hour
  11. you mean 2 players with the same ip can't warp on the same special map? only one can stand on the map
  12. or you may use warpguild instead of warp, 'warp' warp only one player
  13. you mean OnClock instead of OnHour here
  14. It's not correct. // CustomRateCard( <MobID>,<CardID>,<Rate> ); // Rate : 1 = 0.01% / 1000 = 10% / 10000 = 100% 5% => rate 500 not 5000 CustomRateCard( 1086,4128,5000 ); // GTB 5%?? it's arithmetic, use a calculator
  15. Add a sleep in every Deathmatch Grounds npc after OnInit Sample prontera,159,157,5 script Deathmatch Grounds#12 734,{ end; OnInit: sleep 1; //RED TEAM prontera,152,157,5 script Deatchmatch Grounds#11 733,{ end; OnInit: sleep 1; etc..
  16. You're welcome! It didn't take too much time don't worry, and it's better for you to have the choice
  17. Here the docs about colors
  18. - script guild_announce -1,{ OnWhisperGlobal: .@guild_id = getcharid(2); if ( getguildmasterid( .@guild_id ) != getcharid(0) ) end; if ( @accountid_member == 0 ) @total_guild_member = query_sql( "select `account_id`, `char_id` from `guild_member` where `guild_id` = "+ .@guild_id, @accountid_member, @charid_member ); .@mes$ = @whispervar0$; .@name$ = strcharinfo(0); .@origin = getcharid(3); while( .@i < @total_guild_member ) { if ( isloggedin( @accountid_member[.@i], @charid_member[.@i] ) ) { attachrid @accountid_member[.@i]; announce "[ "+ .@name$ +" ]: "+ .@mes$, bc_self; attachrid .@origin; } .@i++; } } I tested it, should work now
  19. oO alright but replace the getguildmasterid line by if ( getguildmasterid( .@guild_id ) != getcharid(0) ) end; otherwise other member can broadcast too
  20. oops replace the 0 by bc_self in the announce
  21. change to 3 produce only accept these item level 1 - Level 1 Weapons 2 - Level 2 Weapons 3 - Level 3 Weapons 21 - Blacksmith's Stones and Metals 22 - Alchemist's Potions, Holy Water, Assassin Cross's Deadly Poison 23 - Elemental Converters
  22. Alright ! well I made one for fun but it's less efficient than source mod - script guild_announce -1,{ OnWhisperGlobal: .@guild_id = getcharid(2); if ( getguildmasterid( .@guild_id ) != getcharid(0) ) end; if ( @accountid_member == 0 ) @total_guild_member = query_sql( "select `account_id`, `char_id` from `guild_member` where `guild_id` = "+ .@guild_id, @accountid_member, @charid_member ); .@mes$ = @whispervar0$; .@name$ = strcharinfo(0); while( .@i < @total_guild_member ) { if ( isloggedin( @accountid_member[.@i], @charid_member[.@i] ) ) { attachrid @accountid_member[.@i]; announce "[ "+ .@name$ +" ]: "+ .@mes$, bc_self; } .@i++; } } The guild leader need to whisper the npc guild_announce and put his message. The npc display the announce to all guild member online without delay EDIT : fix a mistake
  23. //===== rAthena Script ======================================= //= Job Master //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.3 //===== Compatible With: ===================================== //= rAthena SVN r16114+ //===== Description: ========================================= //= A fully functional job changer. //===== Additional Comments: ================================= //= 1.0 Initial script. //= 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. //============================================================ prontera,153,193,6 script Job Master 123,{ function Job_Menu; function A_An; mes "[Job Master]"; if (Class > 4049) { mes "No more jobs are available."; close; } if (checkfalcon() || checkcart() || checkriding() || ismounting()) { mes "Please remove your "+((checkfalcon())?"falcon":"")+((checkcart())?"cart":"")+((checkriding())?"Peco":"")+((ismounting())?"mount":"")+" before proceeding."; close; } if (.SkillPointCheck && SkillPoint) { mes "Please use all your skill points before proceeding."; close; } set .@eac, eaclass(); set .@i, ((.ThirdClass)?roclass(.@eac&EAJ_UPPERMASK):Class); if (.@i > 6 && .@i < 22) { if (BaseLevel < .Rebirth[0] || JobLevel < .Rebirth[1]) { set .@blvl, .Rebirth[0]-BaseLevel; set .@jlvl, .Rebirth[1]-JobLevel; mes "You need "+((.@blvl>0)?.@blvl+" more base levels "+((.@jlvl>0)?"/ ":""):"")+((.@jlvl>0)?.@jlvl+" more job levels ":"")+"to continue."; close; } if (Class > 21) { mes "Switch to third class?"; next; Job_Menu(roclass(.@eac|EAJL_THIRD)); close; } while(1) { mes "Select an option."; next; set .@i, select(" ~ ^0055FFRebirth^000000:"+((.ThirdClass)?" ~ ^FF0000Third Class^000000":"")+": ~ ^777777Cancel^000000"); if (.@i==3) close; mes "[Job Master]"; mes "Are you sure?"; next; Job_Menu(((.@i==1)?4001:roclass(.@eac|EAJL_THIRD))); mes "[Job Master]"; } } set .@j1, roclass(.@eac|EAJL_2_1); set .@j2,roclass(.@eac|EAJL_2_2); if ((.@eac&EAJ_UPPERMASK) == EAJ_SUPER_NOVICE) setarray .@exp[0],roclass(.@eac|EAJL_THIRD),99; if (Class == Job_Ninja) setarray .@exp[0],.@j1,70; if (.@exp[0] && .ThirdClass) { if (BaseLevel < .Rebirth[0] || JobLevel < .@exp[1]) { set .@blvl, .Rebirth[0]-BaseLevel; set .@jlvl, .@exp[1]-JobLevel; mes "You need "+((.@blvl>0)?.@blvl+" more base levels "+((.@jlvl>0)?"/ ":""):"")+((.@jlvl>0)?.@jlvl+" more job levels ":"")+"to continue."; close; } mes "Switch to "+jobname(.@exp[0])+"?"; next; Job_Menu(.@exp[0]); close; } if (.@eac&EAJL_2) if (.@eac&(EAJL_UPPER|EAJL_BABY) || roclass(.@eac|EAJL_UPPER) == -1) { mes "No more jobs are available."; close; } if ((.@eac&EAJ_BASEMASK) == EAJ_NOVICE) { if (JobLevel < .JobReq[0]) mes "A job level of "+.JobReq[0]+" is required to change into the 1st Class."; else if (Class == 4001 && .LastJob && lastJob) { mes "Switch classes now?"; next; Job_Menu(roclass((eaclass(lastJob)&EAJ_BASEMASK)|EAJL_UPPER)); } else switch(Class) { case 0: Job_Menu(1,2,3,4,5,6,23,4046,24,25,4023); case 4001: Job_Menu(4002,4003,4004,4005,4006,4007); case 4023: Job_Menu(4024,4025,4026,4027,4028,4029,4045); default: mes "An error has occurred."; break; } close; } if (roclass(.@eac|EAJL_2_1) == -1 || roclass(.@eac|EAJL_2_2) == -1) mes "No more jobs are available."; else if (!(.@eac&EAJL_2) && JobLevel < .JobReq[1]) mes "A job level of "+.JobReq[1]+" is required to change into the 2nd Class."; else if (.LastJob && lastJob && (.@eac&EAJL_UPPER)) { mes "Switch classes now?"; next; Job_Menu(lastJob+4001); } else Job_Menu(.@j1,.@j2); close; function Job_Menu { while(1) { if (getargcount() > 1) { mes "Select a job."; set .@menu$,""; for(set .@i,0; .@i<getargcount(); set .@i,.@i+1) set .@menu$, .@menu$+" ~ "+jobname(getarg(.@i))+":"; set .@menu$, .@menu$+" ~ ^777777Cancel^000000"; next; set .@i, getarg(select(.@menu$)-1,0); if (!.@i) close; if ((.@i == 23 || .@i == 4045) && BaseLevel < .SNovice) { mes "[Job Master]"; mes "A base level of "+.SNovice+" is required to turn into a "+jobname(.@i)+"."; close; } mes "[Job Master]"; mes "Are you sure?"; next; } else set .@i, getarg(0); if (select(" ~ Change into ^0055FF"+jobname(.@i)+"^000000 class: ~ ^777777"+((getargcount() > 1)?"Go back":"Cancel")+"^000000") == 1) { mes "[Job Master]"; mes "You are now "+A_An(jobname(.@i))+"!"; if (.@i==4001 && .LastJob) set lastJob, Class; jobchange .@i; if (.@i==4001 || .@i==4023) resetlvl(1); specialeffect2 338; specialeffect2 432; if (.Platinum) callsub Get_Platinum; if ( eaclass()&EAJL_THIRD ) { getitem 2795,1;// ***Every Class - Green Apple Ring Item ID# 2795 switch( Class ) { case 4054: case 4060: case 4096: getitem 5746,1;//Rune Knight - Rune Circlet [1] Item ID# 5746 break; case 4057: case 4063: case 4099: getitem 5747,1;// Bishop - Mitra [0] Item ID# 5747 break; case 4056: case 4062: case 4098: getitem 5748,1;// Ranger - Sniper Goggles [1] Item ID# 5748 break; case 4058: case 4064: case 4100: getitem ( Sex? 5749 : 5760 ),1;// Mechanic - Driver Band [1] Item ID# 5749(Male) / Driver Band [1] Item ID# 5760(Female) break; case 4055: case 4061: case 4097: getitem 5753,1;//Warlock - Magic Stone Hat [1] Item ID# 5753 break; case 4070: case 4077: case 4106: getitem 5754,1;//Shura - Blazing Soul [1] Item ID# 5754 break; case 4059: case 4065: case 4101: getitem 5755,1;//Guillotine - Silence Executer [0] tem ID# 5755 break; case 4067: case 4074: case 4103: getitem 5756,1;//Sorcerer - Wind Whisper [1] Item ID# 5756 break; case 4069: case 4076: case 4105: getitem 5758,1;//Wanderer - Dying Swan [1] Item ID# 5758 break; case 4073: case 4066: case 4102: getitem 5757,1;//Royal Guard- Dip Schmidt Helm [1] Item ID# 5757 break; case 4072: case 4079: case 4108: getitem 5750,1; getitem 6121,1; getitem 6122,1;//Shadow Chaser - Shadow Handicraft [1] Item ID# 5750,Makeover Brush Item ID#6121, Paint Brush Item ID# 6122 break; case 4068: case 4075: case 4104: getitem 5751,1;//Minstrel -:: Minstrel Song Hat [1] Item ID# 5751 break; case 4071: case 4078: case 4107: getitem 5752,1;//Genetic - Midas Whisper [1] Item ID# 5752 default: } } close; } if (getargcount() == 1) return; mes "[Job Master]"; } end; } function A_An { setarray .@A$[0],"a","e","i","o","u"; set .@B$, "_"+getarg(0); for(set .@i,0; .@i<5; set .@i,.@i+1) if (compare(.@B$,"_"+.@A$[.@i])) return "an "+getarg(0); return "a "+getarg(0); } Get_Platinum: skill 142,1,0; switch(BaseClass) { case 0: if (Class !=23) skill 143,1,0; break; case 1: skill 144,1,0; skill 145,1,0; skill 146,1,0; break; case 2: skill 157,1,0; break; case 3: skill 147,1,0; skill 148,1,0; break; case 4: skill 156,1,0; break; case 5: skill 153,1,0; skill 154,1,0; skill 155,1,0; break; case 6: skill 149,1,0; skill 150,1,0; skill 151,1,0; skill 152,1,0; break; default: break; } switch(BaseJob) { case 7: skill 1001,1,0; break; case 8: skill 1014,1,0; break; case 9: skill 1006,1,0; break; case 10: skill 1012,1,0; skill 1013,1,0; break; case 11: skill 1009,1,0; break; case 12: skill 1003,1,0; skill 1004,1,0; break; case 14: skill 1002,1,0; break; case 15: skill 1015,1,0; skill 1016,1,0; break; case 16: skill 1007,1,0; skill 1008,1,0; skill 1017,1,0; skill 1018,1,0; skill 1019,1,0; break; case 17: skill 1005,1,0; break; case 18: skill 238,1,0; break; case 19: skill 1010,1,0; break; case 20: skill 1011,1,0; break; default: break; } return; OnInit: setarray .Rebirth[0],99,50; // Minimum base level, job level to rebirth OR change to third class setarray .JobReq[0],10,40; // Minimum job level to turn into 1st class, 2nd class set .ThirdClass,1; // Enable third classes? (1: yes / 0: no) set .SNovice,45; // Minimum base level to turn into Super Novice set .LastJob,1; // Enforce linear class changes? (1: yes / 0: no) set .SkillPointCheck,1; // Force player to use up all skill points? (1: yes / 0: no) set .Platinum,1; // Get platinum skills automatically? (1: yes / 0: no) end; }
  24. Your V4P doesn't use any account variable, it use a query to retrieve the value in a table //===== rAthena Script ======================================= //= Euphy's Quest Shop //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.6a //===== Compatible With: ===================================== //= rAthena SVN r16862+ //===== Description: ========================================= //= A dynamic quest shop based on Lunar's, with easier config. //= Includes support for multiple shops & cashpoints. //= Item Preview script by ToastOfDoom. //===== Additional Comments: ================================= //= 1.0 Initial script. //= 1.2 Added category support. //= 1.3 More options and fixes. //= 1.4 Added debug settings. //= 1.5 Replaced categories with shop IDs. //= 1.6 Added support for purchasing stackables. //= 1.6a Added support for previewing costumes and robes. //============================================================ // Shop NPCs -- supplying no argument displays entire menu. // callfunc "qshopbis"{,<shop ID>{,<shop ID>{,...}}}; //============================================================ prontera,164,203,6 script Quest Shop#bis1 998,{ callfunc "qshopbis"; } // Script Core //============================================================ - script quest_shop2 -1,{ function Add; function Chk; function Slot; function A_An; OnInit: freeloop(1); // ----------------------------------------------------------- // Basic shop settings. // ----------------------------------------------------------- set .Announce,1; // Announce quest completion? (1: yes / 0: no) set .ShowSlot,1; // Show item slots? (2: all equipment / 1: if slots > 0 / 0: never) set .ShowID,0; // Show item IDs? (1: yes / 0: no) set .ShowZeny,0; // Show Zeny cost, if any? (1: yes / 0: no) set .MaxStack,100; // Max number of quest items purchased at one time. // ----------------------------------------------------------- // Points variable -- optional quest requirement. // setarray .Points$[0],"<variable name>","<display name>"; // ----------------------------------------------------------- setarray .Points$[0],"#VOTEPOINTS","Vote Points"; // ----------------------------------------------------------- // Shop IDs -- to add shops, copy dummy data at bottom of file. // setarray .Shops$[1],"<Shop 1>","<Shop 2>"{,...}; // ----------------------------------------------------------- setarray .Shops$[1],"Headgears","Weapons","Other"; // ----------------------------------------------------------- // Quest items -- do NOT use a reward item more than once! // Add(<shop ID>,<reward ID>,<reward amount>, // <Zeny cost>,<point cost>, // <required item ID>,<required item amount>{,...}); // ----------------------------------------------------------- Add(1,5022,1,0,3,7086,1,969,10,999,40,1003,50,984,2); Add(1,5032,1,0,0,1059,250,2221,1,2227,1,7063,600); Add(1,5027,1,0,0,2252,1,1036,400,7001,50,4052,1); Add(1,5045,1,0,0,2252,1,1054,450,943,1200); Add(2,1224,1,0,0,7297,30,969,10,999,50,714,10); Add(2,1225,1,0,0,7292,30,969,10,999,50,714,10); Add(3,531,1,3,0,512,1,713,1); Add(3,532,1,3,0,513,1,713,1); Add(3,533,1,3,0,514,1,713,1); Add(3,534,1,3,0,515,1,713,1); // ----------------------------------------------------------- freeloop(0); set .menu$,""; for(set .@i,1; .@i<=getarraysize(.Shops$); set .@i,.@i+1) { set .menu$, .menu$+.Shops$[.@i]+":"; npcshopdelitem "qshopbis"+.@i,909; } end; OnMenu: set .@size, getarraysize(@i); if (!.@size) set .@i, select(.menu$); else if (.@size == 1) set .@i, @i[0]; else { for(set .@j,0; .@j<.@size; set .@j,.@j+1) set .@menu$, .@menu$+.Shops$[@i[.@j]]+":"; set .@i, @i[select(.@menu$)-1]; } deletearray @i[0],getarraysize(@i); if (.Shops$[.@i] == "") { message strcharinfo(0),"An error has occurred."; end; } dispbottom "Select one item at a time."; callshop "qshopbis"+.@i,1; npcshopattach "qshopbis"+.@i; end; OnBuyItem: // .@q[] : RewardID, BoughtAmt, RewardAmt, BaseAmt, ReqZeny, ReqPts, { ReqItem, ReqAmt, ... } setarray .@q[0],@bought_nameid[0],((@bought_quantity[0] > .MaxStack)?.MaxStack:@bought_quantity[0]); copyarray .@q[3],getd(".q_"+.@q[0]+"[0]"),getarraysize(getd(".q_"+.@q[0])); set .@q[2],.@q[1]*.@q[3]; if (!.@q[2] || .@q[2] > 30000) { message strcharinfo(0),"You can't purchase that many "+getitemname(.@q[0])+"."; end; } query_sql( "SELECT `point` FROM `vote_point` WHERE `loginname` = MD5('"+getcharid(3)+"')", .@vote ); mes "[Quest Shop]"; mes "Reward: ^0055FF"+((.@q[2] > 1)?.@q[2]+"x ":"")+Slot(.@q[0])+"^000000"; mes "Requirements:"; if (.@q[4]) mes " > "+Chk(Zeny,.@q[4]*.@q[1])+(.@q[4]*.@q[1])+" Zeny^000000"; if (.@q[5]) mes " > "+Chk(.@vote,.@q[5]*.@q[1])+(.@q[5]*.@q[1])+" "+.Points$[1]+" ("+.@vote+"/"+(.@q[5]*.@q[1])+")^000000"; if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2) mes " > "+Chk(countitem(.@q[.@i]),.@q[.@i+1]*.@q[1])+((.ShowID)?"{"+.@q[.@i]+"} ":"")+Slot(.@q[.@i])+" ("+countitem(.@q[.@i])+"/"+(.@q[.@i+1]*.@q[1])+")^000000"; next; setarray @qe[1], getiteminfo(.@q[0],5), getiteminfo(.@q[0],11); if (@qe[2] > 0 && ((@qe[1] & 1) || (@qe[1] & 256) || (@qe[1] & 512) || (@qe[1] & 1024) || (@qe[1] & 2048) || (@qe[1] & 4096) || (@qe[1] & 4) || (@qe[1] & 8192))) set .@preview,1; addtimer 1000, strnpcinfo(0)+"::OnEnd"; while(1) { switch(select(" ~ Purchase ^0055FF"+getitemname(.@q[0])+"^000000:"+((.@preview && !@qe[7])?" ~ Preview...":"")+": ~ ^777777Cancel^000000")) { case 1: if (@qe[0]) { mes "[Quest Shop]"; mes "You're missing one or more quest requirements."; close; } if (!checkweight(.@q[0],.@q[2])) { mes "[Quest Shop]"; mes "^FF0000You need "+(((.@q[2]*getiteminfo(.@q[0],6))+Weight-MaxWeight)/10)+" additional weight capacity to complete this trade.^000000"; close; } if (.@q[4]) set Zeny, Zeny-(.@q[4]*.@q[1]); if (.@q[5]) query_sql("UPDATE `vote_point` SET `point` = `point` - "+ (.@q[5]*.@q[1]) +" WHERE `loginname` = MD5('"+getcharid(3)+"')"); if (.@q[6]) for(set .@i,6; .@i<getarraysize(.@q); set .@i,.@i+2) delitem .@q[.@i],.@q[.@i+1]*.@q[1]; for ( .@i = 0; .@i < .@q[2]; .@i++ ) rentitem .@q[0],3600;// 1 hour if (.Announce) announce strcharinfo(0)+" has created "+((.@q[2] > 1)?.@q[2]+"x "+getitemname(.@q[0]):A_An(getitemname(.@q[0])))+"!",0; specialeffect2 EF_FLOWERLEAF; close; case 2: setarray @qe[3], getlook(LOOK_HEAD_BOTTOM), getlook(LOOK_HEAD_TOP), getlook(LOOK_HEAD_MID), getlook(LOOK_ROBE), 1; if ((@qe[1] & 1) || (@qe[1] & 4096)) changelook LOOK_HEAD_BOTTOM, @qe[2]; else if ((@qe[1] & 256) || (@qe[1] & 1024)) changelook LOOK_HEAD_TOP, @qe[2]; else if ((@qe[1] & 512) || (@qe[1] & 2048)) changelook LOOK_HEAD_MID, @qe[2]; else if ((@qe[1] & 4) || (@qe[1] & 8192)) changelook LOOK_ROBE, @qe[2]; break; case 3: close; } } OnEnd: if (@qe[7]) { changelook LOOK_HEAD_BOTTOM, @qe[3]; changelook LOOK_HEAD_TOP, @qe[4]; changelook LOOK_HEAD_MID, @qe[5]; changelook LOOK_ROBE, @qe[6]; } deletearray @qe[0],8; end; function Add { if (getitemname(getarg(1)) == "null") { debugmes "Quest reward #"+getarg(1)+" invalid (skipped)."; return; } setarray .@j[0],getarg(2),getarg(3),getarg(4); for(set .@i,5; .@i<getargcount(); set .@i,.@i+2) { if (getitemname(getarg(.@i)) == "null") { debugmes "Quest requirement #"+getarg(.@i)+" invalid (skipped)."; return; } else setarray .@j[.@i-2],getarg(.@i),getarg(.@i+1); } copyarray getd(".q_"+getarg(1)+"[0]"),.@j[0],getarraysize(.@j); npcshopadditem "qshopbis"+getarg(0),getarg(1),((.ShowZeny)?getarg(3):0); return; } function Chk { if (getarg(0) < getarg(1)) { set @qe[0],1; return "^FF0000"; } else return "^00FF00"; } function Slot { set .@s$,getitemname(getarg(0)); switch(.ShowSlot) { case 1: if (!getitemslots(getarg(0))) return .@s$; case 2: if (getiteminfo(getarg(0),2) == 4 || getiteminfo(getarg(0),2) == 5) return .@s$+" ["+getitemslots(getarg(0))+"]"; default: return .@s$; } } function A_An { setarray .@A$[0],"a","e","i","o","u"; set .@B$, "_"+getarg(0); for(set .@i,0; .@i<5; set .@i,.@i+1) if (compare(.@B$,"_"+.@A$[.@i])) return "an "+getarg(0); return "a "+getarg(0); } } function script qshopbis { deletearray @i[0],getarraysize(@i); for(set .@i,0; .@i<getargcount(); set .@i,.@i+1) set @i[.@i],getarg(.@i); doevent "quest_shop2::OnMenu"; end; } // Dummy shop data -- copy as needed. //============================================================ - shop qshopbis1 -1,909:-1 - shop qshopbis2 -1,909:-1 - shop qshopbis3 -1,909:-1 - shop qshopbis4 -1,909:-1 - shop qshopbis5 -1,909:-1
  25. to change the gm level of a player permanently you must define a group id for your gm level 1 (conf/groups.conf) change the group id of the player with a query ask the player to relog //HERE--> adjgmlvl 1,"+strcharinfo(0)+"; query_sql "update `login` set `group_id` = 1 where `account_id` = "+ getcharid(3);// your group id
×
×
  • Create New...