Jump to content

Yaoi

Members
  • Posts

    25
  • Joined

  • Last visited

Everything posted by Yaoi

  1. I have this error in the console but I don't know in which folder or files to look to solve this error
  2. Yaoi

    Picklog db

    Im not good editing source but i will try, if success ill let you know guys, thanks
  3. Yaoi

    Picklog db

    Im trying to add columns in picklog db so ive made these queries: ALTER TABLE `picklog` ADD `account_id` int( 11 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `char_id`; ALTER TABLE `picklog` ADD `name` varchar( 30 ) NOT NULL DEFAULT '' AFTER `time`; I already have the tables added in picklog but how do i make it works?, do i have to edit any source, log.cpp or something? (in picklog i want it shows the char name of the char id and the account id of this char id.)
  4. Server always crashes when adding a new instances without restarting the server..... RESTART!
  5. I think i added the right lines in status.c but got this error.
  6. @Akkarin the fluxcp im using shows up the char name but is easier and faster to me to use the phpmyadmin. thanks for your help.
  7. Hi community! I would like to know how to add a new permanent table in the picklog db showing the char names... Actually it only shows the char id. someone helped me time ago to do it with a QUERY : SELECT id,time,picklog.char_id,type,nameid,amount,refine,card0,card1,card2,card3,unique_id,map,char.name FROM picklog LEFT JOIN `char` ON char.char_id = picklog.char_id; But i want to make it permanent, Thanks.
  8. Yaoi

    Script Commands

    Thanks Ninja, i will try.
  9. Hi. Just wanna know which script commands is used to check the server's day of the week. i mean if i want to start a script automatically every Sunday, which script command should i use for it ? it is for fixing this script... : - script no3jobswoe -1,{ OnInit: setmapflag "aldeg_cas02",mf_loadevent; end; OnPCLoadMapEvent: [email protected]$ = strcharinfo(3); if ( getmapflag( [email protected]$,mf_gvg_castle ) ) { if ( Class >= 4054 && gettime(3) == 21 ) { mes "Today only 2nds Jobs are allowed to enter the castle."; close2; warp "SavePoint",0,0; } } end; }
  10. //===== rAthena Script ======================================= //= Euphy's WOE Controller //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.5 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= A controller for War of Emperium designed for //= simplicity and ease of use. //= Many concepts taken from ToastOfDoom's script, //= and "rewards" function originally by Goddameit. //===== Additional Comments: ================================= //= Be sure to disable the default agit controllers! //== npc\guild\agit_controller.txt //== npc\guild2\agit_start_se.txt //============================================================ // Information NPC //============================================================ prontera,143,191,4 script WOE Information 835,{ doevent "WOE_CONTROL::OnMenu"; end; OnAgitStart: while(agitcheck()) { specialeffect 964; sleep 425; } end; } // Script Core //============================================================ - script WOE_CONTROL -1,{ function Disp_Owner; function Add_Zero; OnInit: // ----------------------------------------------------------- // Configuration settings. // ----------------------------------------------------------- set .CastleWarp,0; // 1: Always enable all castle warps. | 0: Warp only to active castles. set .AutoKick,1; // Automatically kick players from inactive castles during WOE? (1:yes / 0:no) set .NoOwner,0; // Automatically kick players from unconquered castles outside of WOE? (1:yes / 0:no) set .ExitWarp,0; // Warp all players from castles when WOE ends? (1:yes / 0:no) set .GMAccess,99; // GM level required to access Session Manager. // ----------------------------------------------------------- // 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; // Rewards per castle. // -- when given directly: <itemID>,<amount>{,<itemID>,<amount>,...} // -- via mail (option 2): <itemID>,<amount>,<Zeny> setarray .Reward[0],30076,1,30078,1,30073,10,30077,1,12038,1; // ----------------------------------------------------------- // Constants (leave this section alone). // ----------------------------------------------------------- setarray .Castles$[0], "prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05", "payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05", "gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05", "aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05", "arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05", "schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05"; setarray .EndLabel$[0],"ar01","ar02","ar03","ar04","ar05","sc01","sc02","sc03","sc04","sc05"; setarray .Days$[0],"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"; setarray .Regions$[0],"Prontera","Payon","Geffen","Aldebaran","Arunafeltz","Schwaltzvalt"; setarray .Map$[0],"prt_gld","pay_gld","gef_fild13","alde_gld","aru_gld","sch_gld"; setarray .MapX[0],134,240,153,111,208,121,295,317,140,204,214,308,143,193,305,48, 95,142,239,264,158,83, 68,299,292,293,288, 97,137, 71; setarray .MapY[0], 65,128,137,240,240,233,116,293,160,266, 75,240,240,278, 87,83,249, 85,242, 90,272,47,155,345,107,100,252,196, 90,315; // ----------------------------------------------------------- set .Size, getarraysize($WOE_CONTROL); if (.AutoKick || .NoOwner) for(set [email protected],0; [email protected]<30; set [email protected],[email protected]+1) { setmapflag .Castles$[[email protected]], mf_loadevent; setd "."+.Castles$[[email protected]], [email protected]; } if (!agitcheck() && !agitcheck2()) sleep 4000; set .Init,1; OnMinute00: freeloop(1); if (agitcheck() || agitcheck2()) { for(set [email protected],0; [email protected]<.Size; set [email protected],[email protected]+4) if (gettime(4) == $WOE_CONTROL[[email protected]] && gettime(3) == $WOE_CONTROL[[email protected]+2]) { OnWOEEnd: announce "La Guerra de Emperium ha finalizado!",bc_all|bc_woe; AgitEnd; AgitEnd2; sleep 1000; for(set [email protected],0; [email protected]<30; set [email protected],[email protected]+1) { if (.Active[0]&(1<<[email protected])) Disp_Owner(.Castles$[[email protected]],1); if (.ExitWarp) maprespawnguildid .Castles$[[email protected]],0,3; } if (.Options&1 && .Active[0] && .ForceEnd != 2) callsub OnReward, .Active[0]; deletearray .Active[0],2; if (.ForceEnd) { set .ForceEnd,0; end; } break; } } if ((!agitcheck() && !agitcheck2()) || .Init) { if (!agitcheck() && !agitcheck2()) set .Init,0; for(set [email protected],0; [email protected]<.Size; set [email protected],[email protected]+4) if (gettime(4) == $WOE_CONTROL[[email protected]] && gettime(3) >= $WOE_CONTROL[[email protected]+1] && gettime(3) < $WOE_CONTROL[[email protected]+2]) { deletearray .Active[0],2; set .Active[0], $WOE_CONTROL[[email protected]+3]; if (.Init) { AgitEnd; AgitEnd2; } else announce "La Guerra de Emperium ha Iniciado!",bc_all|bc_woe; sleep 1000; AgitStart; AgitStart2; for(set [email protected],0; [email protected]<30; set [email protected],[email protected]+1) { if (.Active[0]&(1<<[email protected])) { if (!.Init) Disp_Owner(.Castles$[[email protected]],0); set .Active[1], .Active[1] | (1<<(([email protected]/5)+1)); } else { if ([email protected]<20) { donpcevent "Agit#"+.Castles$[[email protected]]+"::OnAgitEnd"; killmonster .Castles$[[email protected]], "Agit#"+.Castles$[[email protected]]+"::OnAgitBreak"; } else { donpcevent "Manager#"+.Castles$[[email protected]]+"::OnAgitEnd2"; killmonster .Castles$[[email protected]], "Steward#"+.EndLabel$[[email protected]]+"::OnStartArena"; } } } break; } } set .Init,0; end; function Disp_Owner { set [email protected], getcastledata(getarg(0),1); if ([email protected]) announce "The ["+getcastlename(getarg(0))+"] castle "+((getarg(1))?"has been conquered":"is currently held")+" by the ["+getguildname([email protected])+"] guild.",bc_all|bc_woe; else announce "The ["+getcastlename(getarg(0))+"] castle is currently unoccupied.",bc_all|bc_woe; return; } function Add_Zero { return ((getarg(0)<10)?"0":"")+getarg(0)+(getarg(1,0)?".":":")+"00"; } OnReward: set [email protected]$, ((.Options&4)?"position = 0":"online = 1"); if (.Options&2) set [email protected]$,gettimestr("%B %d, %Y",21); freeloop(1); for(set [email protected],0; [email protected]<30; set [email protected],[email protected]+1) if (getarg(0)&(1<<[email protected])) { set [email protected], getcastledata(.Castles$[[email protected]],1); if ([email protected]) continue; set [email protected]ize, query_sql("SELECT account_id,char_id FROM `guild_member` WHERE guild_id = '"[email protected]+"' AND "[email protected]$,[email protected],[email protected]); for(set [email protected],0; [email protected]<[email protected]; set [email protected],[email protected]+1) { if (.Options&8 && !(.Options&4)) { set [email protected]$, replacestr(getcharip([email protected][[email protected]]),".","a"); if (getd("[email protected]_"[email protected]+"_"[email protected]$)) continue; setd "[email protected]_"[email protected]+"_"[email protected]$,1; } if (.Options&2) { query_sql("INSERT INTO `mail` (send_name,dest_id,title,message,nameid,amount,identify,zeny,time) VALUES ("+ "'no-reply',"[email protected][[email protected]]+",'** Siege Reward: "+getcastlename(.Castles$[[email protected]])+" **',"+ "'Brave one,% % Congratulations!% Your guild has successfully occupied% territory in the War of Emperium on% "[email protected]$+".% % % % % [ Your reward is attached. ]',"+ .Reward[0]+","+.Reward[1]+",0,"+.Reward[2]+",UNIX_TIMESTAMP(NOW()))"); if (!getd("[email protected]_"[email protected][[email protected]]) && isloggedin([email protected][[email protected]],[email protected][[email protected]])) { setd "[email protected]_"[email protected][[email protected]],1; message rid2name([email protected][[email protected]]),"You've got mail! Please re-login to update your mailing list."; } } else if (isloggedin([email protected][[email protected]])) { for(set [email protected],0; [email protected]<getarraysize(.Reward); set [email protected],[email protected]+2) getitem .Reward[[email protected]], .Reward[[email protected]+1], [email protected][[email protected]]; message rid2name([email protected][[email protected]]),"You have been rewarded for conquering "+getcastlename(.Castles$[[email protected]])+"."; } } } if (.Options&2) query_sql("UPDATE `mail` SET message = REPLACE(message,'%',CHAR(13)) WHERE send_name = 'no-reply'"); return; OnPCLoadMapEvent: if (!compare(strcharinfo(3),"g_cas")) end; if (((.AutoKick && .Active[0]) || (.NoOwner && !getcastledata(strcharinfo(3),1))) && !(.Active[0]&(1<<getd("."+strcharinfo(3))))) { if (getcharid(2) && getcastledata(strcharinfo(3),1) == getcharid(2)) end; sleep2 1000; message strcharinfo(0), getcastlename(strcharinfo(3))+" is currently inactive."; sleep2 5000; if (compare(strcharinfo(3),"g_cas")) warp "SavePoint",0,0; } end; OnMenu: while(1) { mes "[WOE Information]"; if (agitcheck() || agitcheck2()) { if (.Active[0]) { for(set [email protected],0; [email protected]<.Size; set [email protected],[email protected]+4) if (gettime(4) == $WOE_CONTROL[[email protected]] && gettime(3) >= $WOE_CONTROL[[email protected]+1] && gettime(3) < $WOE_CONTROL[[email protected]+2]) { set [email protected], $WOE_CONTROL[[email protected]+2]; break; } mes "La Guerra de Emperium esta ^0055FFActiva^000000 hasta ^FF0000"+Add_Zero([email protected])+"^000000 en la siguiente zona:"; mes " "; for(set [email protected],0; [email protected]<6; set [email protected],[email protected]+1) if (.Active[1]&(1<<([email protected]+1))) mes " > ^777777"+.Regions$[[email protected]]+"^000000"; } else mes "La Guerra de Emperium esta ^0055FFActiva^000000."; } else { for(set [email protected],0; [email protected]<.Size; set [email protected],[email protected]+4) if ((gettime(4) == $WOE_CONTROL[[email protected]] && gettime(3) <= $WOE_CONTROL[[email protected]+1]) || gettime(4) < $WOE_CONTROL[[email protected]]) { setarray [email protected][0],$WOE_CONTROL[[email protected]],$WOE_CONTROL[[email protected]+1]; break; } if (!getarraysize([email protected])) setarray [email protected][0],$WOE_CONTROL[0],$WOE_CONTROL[1]; mes "La Guerra de Emperium esta ^777777Inactiva^000000."; if (.Size) { mes " "; mes "The next session will begin"; mes "on ^0055FF"+.Days$[[email protected][0]]+"^000000 at "+Add_Zero([email protected][1])+"^000000."; } } next; switch(select(""+((.CastleWarp || .Active[1])?" ~ Warp to castles...":"")+": ~ Check schedule...: ~ View castle owners...:"+((getgmlevel()<.GMAccess || !getgmlevel())?"":" ~ Manage sessions...")+": ~ ^777777Cancel^000000")) { case 1: if (.CastleWarp) set [email protected]$,"^0055FF"; set [email protected]$,""; for(set [email protected],0; [email protected]<6; set [email protected],[email protected]+1) { if (.CastleWarp || .Active[1]&(1<<([email protected]+1))) set [email protected]$, [email protected]$+" ~ "+((.Active[1]&(1<<([email protected]+1)))[email protected]$:"^777777")+.Regions$[[email protected]]+" Castles^000000"; set [email protected]$, [email protected]$+":"; } set [email protected], select([email protected]$)-1; set [email protected]$,""; for(set [email protected],[email protected]*5; [email protected]<([email protected]*5)+5; set [email protected],[email protected]+1) { if (.CastleWarp || .Active[0]&(1<<[email protected])) set [email protected]$, [email protected]$+" ~ "+((.Active[0]&(1<<[email protected]))[email protected]$:"^777777")+getcastlename(.Castles$[[email protected]])+"^000000"; set [email protected]menu$, [email protected]$+":"; } set [email protected], select([email protected]$)-1; warp .Map$[[email protected]],.MapX[([email protected]*5)[email protected]],.MapY[([email protected]*5)[email protected]]; close; case 2: mes "[Schedule]"; if (.Size) { freeloop(1); for(set [email protected],0; [email protected]<.Size; set [email protected],[email protected]+4) { mes "> ^FF0000"+.Days$[$WOE_CONTROL[[email protected]]]+" ("+Add_Zero($WOE_CONTROL[[email protected]+1])+"-"+Add_Zero($WOE_CONTROL[[email protected]+2])+")^000000"; for(set [email protected],0; [email protected]<30; set [email protected],[email protected]+1) if ($WOE_CONTROL[[email protected]+3]&(1<<[email protected])) mes " ~ "+getcastlename(.Castles$[[email protected]])+" ^777777("+.Castles$[[email protected]]+")^000000"; if ([email protected]+4 < .Size) mes " "; } freeloop(0); } else mes "No times are configured."; next; break; case 3: mes "[Castle Ownership]"; for(set [email protected],0; [email protected]<6; set [email protected],[email protected]+1) { set [email protected], [email protected]*5; mes "> ^FF0000"+.Regions$[[email protected]]+"^000000"; for(set [email protected],[email protected]; [email protected]<([email protected]+5); set [email protected],[email protected]+1) { set [email protected], getcastledata(.Castles$[[email protected]],1); mes " ~ "+getcastlename(.Castles$[[email protected]])+": "+(([email protected])?"^0055FF"+getguildname([email protected]):"^777777unoccupied")+"^000000"; } if ([email protected] < 5) mes " "; } next; break; case 4: while(1) { mes "[Session Manager]"; mes "There are ^0055FF"+(.Size/4)+" session(s)^000000 configured."; mes "What would you like to do?"; next; switch(select(" ~ Add a session...: ~ Delete a session...: ~ Reload settings...:"+((agitcheck() || agitcheck2())?" ~ End WOE session...":"")+": ~ ^777777Go back^000000")) { case 1: mes "[New Session]"; if (.Size > 127) { mes "You have already reached the maximum of 32 sessions."; next; break; } mes "Select a day."; next; set [email protected], select(" ~ "+implode(.Days$,": ~ "))-1; mes "[New Session]"; mes "Select a start time for ^0055FF"+.Days$[[email protected]]+"^000000."; next; set [email protected]$,""; for(set [email protected],0; [email protected]<23; set [email protected],[email protected]+1) set [email protected]$, [email protected]$+" ~ "+Add_Zero([email protected],1)+":"; set [email protected], select([email protected]$)-1; mes "[New Session]"; mes "Select an end time for ^0055FF"+.Days$[[email protected]]+"^000000."; next; set [email protected]$,""; for(set [email protected],[email protected]+1; [email protected]<24; [email protected],[email protected]+1) set [email protected]$, [email protected]$+" ~ "+Add_Zero([email protected],1)+":"; set [email protected], select([email protected]$)[email protected]; for(set [email protected],0; [email protected]<.Size; set [email protected],[email protected]+4) if ([email protected] == $WOE_CONTROL[[email protected]] && (([email protected] >= $WOE_CONTROL[[email protected]+1] && [email protected] < $WOE_CONTROL[[email protected]+2]) || ([email protected] > $WOE_CONTROL[[email protected]+1] && [email protected] <= $WOE_CONTROL[[email protected]+2]) || ([email protected] <= $WOE_CONTROL[[email protected]+1] && [email protected] >= $WOE_CONTROL[[email protected]+2]))) { mes "[New Session]"; mes "The chosen times overlap with an existing session."; next; set [email protected],1; break; } if ([email protected]) { set [email protected],0; break; } set [email protected],0; while(1) { mes "[New Session]"; mes "^0055FF"+.Days$[[email protected]]+" ("+Add_Zero([email protected])+"-"+Add_Zero([email protected])+")^000000"; mes " > Castles:"; if ([email protected]) mes " ~ ^777777(none selected)^000000"; else for(set [email protected],0; [email protected]<30; set [email protected],[email protected]+1) if ([email protected]&(1<<[email protected])) mes " ~ "+getcastlename(.Castles$[[email protected]])+" ("+.Castles$[[email protected]]+")"; next; set [email protected]$,(([email protected])?" ~ ^FF0000Finished...^000000":"")+":"; for(set [email protected],0; [email protected]<30; set [email protected],[email protected]+1) set [email protected]$, [email protected]$+" ~ "+(([email protected]&(1<<[email protected]))?"^0055FF":"")+getcastlename(.Castles$[[email protected]])+" ("+.Castles$[[email protected]]+")^000000:"; set [email protected], select([email protected]$)-1; if ([email protected]) set [email protected], [email protected]^(1<<([email protected])); else { mes "[New Session]"; mes "Are you sure?"; next; switch(select(" ~ ^0055FFAdd session...^000000: ~ Continue selecting castles...: ~ ^777777Cancel^000000")) { case 1: for(set [email protected],0; [email protected]<.Size; set [email protected],[email protected]+4) if (([email protected] == $WOE_CONTROL[[email protected]] && [email protected] <= $WOE_CONTROL[[email protected]+1]) || [email protected] < $WOE_CONTROL[[email protected]]) { set [email protected],1; break; } if ([email protected]) { set [email protected],1; set [email protected],.Size; } copyarray $WOE_CONTROL[[email protected]+4], $WOE_CONTROL[[email protected]], [email protected]; setarray $WOE_CONTROL[[email protected]], [email protected], [email protected], [email protected], [email protected]; set .Size, getarraysize($WOE_CONTROL); case 3: mes "[New Session]"; mes (([email protected])?"Session added.":"Cancelled."); next; set [email protected],1; case 2: break; } if ([email protected]) { set [email protected],0; break; } } } break; case 2: mes "[Remove Session]"; if (!.Size) { mes "There are no sessions configured."; next; break; } mes "Select a session to remove."; next; set [email protected]$,""; for(set [email protected],0; [email protected]<.Size; set [email protected],[email protected]+4) set [email protected]$, [email protected]$+" ~ "+.Days$[$WOE_CONTROL[[email protected]]]+" ("+Add_Zero($WOE_CONTROL[[email protected]+1],1)+"-"+Add_Zero($WOE_CONTROL[[email protected]+2],1)+"):"; set [email protected]$, [email protected]$+" ~ ^777777Cancel^000000"; set [email protected], select([email protected]$)-1; if ([email protected] == (.Size/4)) break; mes "[Remove Session]"; mes "Delete ^0055FF"+.Days$[$WOE_CONTROL[[email protected]*4]]+"'s^000000 session?"; mes "This action cannot be undone."; next; set [email protected], select(" ~ ^FF0000Delete session...^000000: ~ ^777777Cancel^000000"); mes "[Remove Session]"; if ([email protected] == 2) mes "Cancelled."; else { deletearray $WOE_CONTROL[[email protected]*4],4; set .Size, getarraysize($WOE_CONTROL); mes "Session deleted."; } next; break; case 3: mes "[Reload Settings]"; mes "This will trigger all events related to new session configurations, if any."; if (agitcheck() || agitcheck2()) { mes " "; mes "Be aware that this will disrupt the current WOE session."; } next; set [email protected], select(" ~ ^0055FFReload settings...^000000: ~ ^777777Cancel^000000"); mes "[Reload Settings]"; if ([email protected] == 2) mes "Cancelled."; else { set .Init,1; donpcevent "WOE_CONTROL::OnMinute00"; mes "Variables have been re-initialized."; } next; break; case 4: mes "[Force Agit End]"; if (!agitcheck() && !agitcheck2()) { mes "WOE has already ended."; next; break; } mes "This command will safely execute all AgitEnd events."; mes " "; mes "Kill the current WOE session?"; next; set [email protected], select(" ~ ^FF0000End session...^000000:"+((.Options&1)?" ~ ^FF0000End session without rewards...^000000":"")+": ~ ^777777Cancel^000000"); mes "[Force Agit End]"; if ([email protected] == 3) mes "Cancelled."; else { set .ForceEnd, [email protected]; donpcevent "WOE_CONTROL::OnWOEEnd"; mes "WOE session terminated."; } next; break; case 5: set [email protected],1; break; } if ([email protected]) { set [email protected],0; break; } } break; case 5: close; } } } //WOE Information 835 invek,134,181,4 duplicate(WOE Information) WOE Information#inv 835 Actually im using de Euphy's WOE Controller 1.5 and just wondering how can i add an option to make the emperium walkable randomly (in the emperium room only) and add it to configuration settings to be able to edit at any time.
  11. Thanks Emistry I'll try your script.
  12. Hi, I need a script that checks quantity of guild members in guild castles. - Max users allowed per guild in the same castle = 15 -If users are > 15, the 16th user member of the same guild will be warped to save point automatically. -Npc with gm access to modify the quantity of members allowed in guild castles maps. note: i know there's a way to modify the guild members qty (like changing the guild extension skill lvl) but i prefer to use the script. I would pay for the script if its necessary.
  13. Thanks Mystrs but the question is How to do that ? hehe Which files do i have to modify? Thanks again. i want to know this because when i was using ragexe 2012-04-10 i was able to Kill or see the npc real name added in the scripts without using commands @. but when update to 2013 client this function does not work. its very helpful to have this option.
  14. How to add / modify functions or commands with the right click in the Admin account?
  15. just want to add preview item option in the Voteforpoints script.
  16. Hi rAthena! Currently Im using the JayPee Mateo Voteforpoints NPC. Its working Nice! //setarray .itemShop[0], 30005,700,30024,600,5545,200,5546,200,5514,200,5515,200,5588,200,5589,200,5598,200,5599,200,5662,200,5663,200,5739,200,5740,200,5676,200,5677,200,5744,200,5745,200,5512,200,5513,200,5549,200,5550,200,607,1; // <ITEM_ID>,<PRICE> //==================================================================================== //Script Name: Vote For Points NPC Script for FluxCP //SVN: Tested in rAthena r156513 //Developed By: JayPee Mateo //Version: 1.0 //Requirement(s): FluxCP V4P Addon //Description: This is a npc script for FluxCP Vote for points in order for the players //to claim their vote points //==================================================================================== florian,204,164,4 script VotaPuntos 862,{ //Function Prototypes function garbagecol;//Garbage collection for the Character variables garbagecol(); function add_item; //Syntanx: add_item(ITEMID,QUANTITY,POINTS,CATEGORY); function makeCategory;//This will return a list of the categories function getItemsByCat;//This will return the list of items associated to the particular category function getItemDetails;//This will return the details of the item function getPoints;//This will return the points of the player stored in the database function updatePoints;//This will updates the points of the player stored in the database //NPC Name set .npcname$,"[ Vota Puntos ]"; //Initialization of the Rewards add_item(18743,1,400,"Costume"); add_item(30124,1,400,"Costume"); add_item(19661,1,500,"Costume"); add_item(12036,1,2,"Consumibles"); add_item(12037,1,2,"Consumibles"); add_item(18859,1,400,"Hats"); add_item(18540,1,400,"Hats"); add_item(18844,1,400,"Hats"); //Script Start mes .npcname$; mes "Gracias por ayudar al servidor a crecer con tus votos, Te gustaria cambiar tus puntos de votacion?"; switch(select("Si:Ver mis puntos")) { case 1: next; mes .npcname$; mes "Porfavor elige una categoria:"; set [email protected],select(makeCategory())-1; next; mes .npcname$; mes "Porfavor elige el articulo que deseas:"; set [email protected],select(getItemsByCat(@listCat$[[email protected]]))-1; next; mes .npcname$; set [email protected],getItemDetails(@itemKeys[[email protected]],"itemid"); set [email protected],getItemDetails(@itemKeys[[email protected]],"quantity"); set [email protected],getItemDetails(@itemKeys[[email protected]],"points"); mes "ID del articulo:"[email protected]; mes "Nombre del Articulo: "+getitemname([email protected]); mes "Cantidad: "[email protected]+" pc(s)."; mes "Costo por articulo: "[email protected]+" pt(s)."; mes "\n"; mes "hacemos trato?"; if(select("Si:No")==1) { set [email protected],getPoints(getcharid(3)); if([email protected]>[email protected]) { next; mes .npcname$; updatePoints(getcharid(3),[email protected]); getitem [email protected],[email protected]; mes "Gracias por votar!. No olvides hacerlo de nuevo!. :D"; } else mes "Lo siento, no tienes los puntos necesarios para este articulo."; } else { next; mes .npcname$; mes "Okay bye!"; } garbagecol(); close; case 2: next; mes .npcname$; set [email protected],getPoints(getcharid(3)); mes "Actualmente dispones de "[email protected]+" pt(s)."; garbagecol(); close; } end; //Functions Bodies function updatePoints { set [email protected]_id,getarg(0); set [email protected],getarg(1); query_sql("UPDATE `cp_v4p_voters` SET points=(points-"[email protected]+") WHERE account_id='"[email protected]_id+"'"); return; } function getPoints { set [email protected]_id,getarg(0); query_sql("SELECT `points` FROM `cp_v4p_voters` WHERE account_id="[email protected]_id+" LIMIT 1",[email protected]); if(getarraysize([email protected])==0) return 0; return [email protected][0]; } function getItemDetails { set [email protected],getarg(0); //Key set [email protected]$,getarg(1); //What details to return such as ItemID, Points, Quantity, Category if(strtolower([email protected]$) == strtolower("ItemID")) return @itemID[[email protected]]; else if(strtolower([email protected]$) == strtolower("Quantity")) return @itemQ[[email protected]]; else if(strtolower([email protected]$) == strtolower("Points")) return @points[[email protected]]; else if(strtolower([email protected]$) == strtolower("Category")) return @category$[[email protected]]; } function getItemsByCat { set [email protected]$,getarg(0); set [email protected]_string$,""; set [email protected],0; for(set [email protected],0; [email protected]<getarraysize(@category$); set [email protected],[email protected]+1) { if(strtolower([email protected]$) == strtolower(@category$[[email protected]])) { setarray @itemKeys[[email protected]],[email protected]; if([email protected]_string$ == "") set [email protected]_string$,getitemname(@itemID[[email protected]]); else set [email protected]_string$,[email protected]_string$+":"+getitemname(@itemID[[email protected]]); set [email protected],[email protected]+1; } } return [email protected]_string$; } function makeCategory { set [email protected]_string$,""; for(set [email protected],0; [email protected]<getarraysize(@category$); set [email protected],[email protected]+1) { if([email protected]_string$ == "") { setarray @listCat$[getarraysize(@listCat$)],@category$[[email protected]]; set [email protected]_string$,@category$[[email protected]]; } else { if(compare([email protected]_string$,@category$[[email protected]])==0) { setarray @listCat$[getarraysize(@listCat$)],@category$[[email protected]]; set [email protected]_string$,[email protected]_string$+":"[email protected]<script data-cfhash='f9e31' type="text/javascript">/* */</script>$[[email protected]]; } } } return [email protected]_string$; } function add_item { set [email protected],getarg(0,-1); //IteID set [email protected],getarg(1,-1); //Item Quantity set [email protected],getarg(2,-1); set [email protected]$,getarg(3,"Uncategorized"); //Category if([email protected] == -1) { debugmes "Invalid Item ID. Script not completely loaded."; end; } else if([email protected] == -1) { debugmes "Invalid Item Quantity. Script not completely loaded."; end; } else if([email protected] == -1) { debugmes "Points assignment error. Script not completely loaded."; end; } set [email protected],getarraysize(@itemID); setarray @itemID[[email protected]],[email protected]; setarray @itemQ[[email protected]],[email protected]; setarray @points[[email protected]],[email protected]; setarray @category$[[email protected]],[email protected]$; return 1; //return 1 as success } function garbagecol{ deletearray @itemID[0],128; deletearray @itemQ[0],128; deletearray @points[0],128; deletearray @category$[0],128; deletearray @listCat$[0],128; deletearray @itemKeys[0],128; return; } } But I would like to make it similar to the Euphy's Dynamic Shop with the changelook option, costume headgears changelook. etc. //===== rAthena Script ======================================= //= Euphy's Quest Shop //===== By: ================================================== //= Euphy //===== Current Version: ===================================== //= 1.6c //===== Compatible With: ===================================== //= rAthena Project //===== 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. //= 1.6b Added 'disable_items' command. //= 1.6c Replaced function 'A_An' with "F_InsertArticle". //============================================================ // Shop NPCs -- supplying no argument displays entire menu. // callfunc "qshop"{,<shop ID>{,<shop ID>{,...}}}; //============================================================ florian,83,135,6 script Sombreros Quest#1 408,{ callfunc "qshop"; } // Script Core //============================================================ - script quest_shop -1,{ function Add; function Chk; function Slot; 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],"#CASHPOINTS","Cash Points"; // ----------------------------------------------------------- // Shop IDs -- to add shops, copy dummy data at bottom of file. // setarray .Shops$[1],"<Shop 1>","<Shop 2>"{,...}; // ----------------------------------------------------------- setarray .Shops$[1],"Sombreros"; // ----------------------------------------------------------- // 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,18930,1,0,0,7011,100,10018,20,753,100,6242,200); Add(1,18931,1,0,0,1060,150,1048,200,2249,50,6242,200); Add(1,18932,1,0,0,947,200,6023,100,6022,10,6242,200); Add(1,18547,1,0,0,12374,150,12018,500,2250,50,6242,200); Add(1,18548,1,0,0,7799,200,2252,70,975,20,6242,200); Add(1,18549,1,0,0,7168,300,2718,50,710,150,6242,200); // // 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 [email protected],1; [email protected]<=getarraysize(.Shops$); set [email protected],[email protected]+1) { set .menu$, .menu$+.Shops$[[email protected]]+":"; npcshopdelitem "qshop"[email protected],909; } end; OnMenu: set [email protected], getarraysize(@i); if ([email protected]) set @shop_index, select(.menu$); else if ([email protected] == 1) set @shop_index, @i[0]; else { for(set [email protected],0; [email protected]<[email protected]; set [email protected],[email protected]+1) set [email protected]$, [email protected]$+.Shops$[@i[[email protected]]]+":"; set @shop_index, @i[select([email protected]$)-1]; } deletearray @i[0],getarraysize(@i); if (.Shops$[@shop_index] == "") { message strcharinfo(0),"An error has occurred."; end; } dispbottom "Select one item at a time."; callshop "qshop"[email protected]_index,1; npcshopattach "qshop"[email protected]_index; end; OnBuyItem: // [email protected][] : RewardID, BoughtAmt, RewardAmt, BaseAmt, ReqZeny, ReqPts, { ReqItem, ReqAmt, ... } setarray [email protected][0],@bought_nameid[0],((@bought_quantity[0] > .MaxStack)?.MaxStack:@bought_quantity[0]); copyarray [email protected][3],getd(".q_"[email protected]_index+"_"[email protected][0]+"[0]"),getarraysize(getd(".q_"[email protected]_index+"_"[email protected][0])); set [email protected][2],[email protected][1]*[email protected][3]; if ([email protected][2] || [email protected][2] > 30000) { message strcharinfo(0),"No puedes comprar tantos hats "+getitemname([email protected][0])+"."; end; } mes "[Quest Shop]"; mes "Reward: ^0055FF"+(([email protected][2] > 1)[email protected][2]+"x ":"")+Slot([email protected][0])+"^000000"; mes "Requirements:"; disable_items; if ([email protected][4]) mes " > "+Chk(Zeny,[email protected][4]*[email protected][1])+([email protected][4]*[email protected][1])+" Zeny^000000"; if ([email protected][5]) mes " > "+Chk(getd(.Points$[0]),[email protected][5]*[email protected][1])+([email protected][5]*[email protected][1])+" "+.Points$[1]+" ("+getd(.Points$[0])+"/"+([email protected][5]*[email protected][1])+")^000000"; if ([email protected][6]) for(set [email protected],6; [email protected]<getarraysize([email protected]); set [email protected],[email protected]+2) mes " > "+Chk(countitem([email protected][[email protected]]),[email protected][[email protected]+1]*[email protected][1])+((.ShowID)?"{"[email protected][[email protected]]+"} ":"")+Slot([email protected][[email protected]])+" ("+countitem([email protected][[email protected]])+"/"+([email protected][[email protected]+1]*[email protected][1])+")^000000"; next; setarray @qe[1], getiteminfo([email protected]q[0],5), getiteminfo([email protected][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 [email protected],1; addtimer 1000, strnpcinfo(0)+"::OnEnd"; while(1) { switch(select(" Obtener ^0055FF"+getitemname([email protected][0])+"^000000:"+(([email protected] && [email protected][7])?" Probarmelo...":"")+": ^777777Nada^000000")) { case 1: if (@qe[0]) { mes "[Quest Shop]"; mes "Parece que no tienes todo, revisa tu inventario."; close; } if (!checkweight([email protected][0],[email protected][2])) { mes "[Quest Shop]"; mes "^FF0000You need "+((([email protected][2]*getiteminfo([email protected][0],6))+Weight-MaxWeight)/10)+" additional weight capacity to complete this trade.^000000"; close; } if ([email protected][4]) set Zeny, Zeny-([email protected][4]*[email protected][1]); if ([email protected][5]) setd .Points$[0], getd(.Points$[0])-([email protected][5]*[email protected][1]); if ([email protected][6]) for(set [email protected],6; [email protected]<getarraysize([email protected]); set [email protected],[email protected]+2) delitem [email protected][[email protected]],[email protected][[email protected]+1]*[email protected][1]; getitem [email protected][0],[email protected][2]; if (.Announce) announce strcharinfo(0)+" Se ha creado un "+(([email protected][2] > 1)[email protected][2]+"x "+getitemname([email protected][0]):callfunc("F_InsertArticle",getitemname([email protected][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 [email protected][0],getarg(2),getarg(3),getarg(4); for(set [email protected],5; [email protected]<getargcount(); set [email protected],[email protected]+2) { if (getitemname(getarg([email protected])) == "null") { debugmes "Quest requirement #"+getarg([email protected])+" invalid (skipped)."; return; } else setarray [email protected][[email protected]],getarg([email protected]),getarg([email protected]+1); } copyarray getd(".q_"+getarg(0)+"_"+getarg(1)+"[0]"),[email protected][0],getarraysize([email protected]); npcshopadditem "qshop"+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 [email protected]$,getitemname(getarg(0)); switch(.ShowSlot) { case 1: if (!getitemslots(getarg(0))) return [email protected]$; case 2: if (getiteminfo(getarg(0),2) == 4 || getiteminfo(getarg(0),2) == 5) return [email protected]$+" ["+getitemslots(getarg(0))+"]"; default: return [email protected]$; } } } function script qshop { deletearray @i[0],getarraysize(@i); for(set [email protected],0; [email protected]<getargcount(); set [email protected],[email protected]+1) set @i[[email protected]],getarg([email protected]); doevent "quest_shop::OnMenu"; end; } // Dummy shop data -- copy as needed. //============================================================ - shop qshop1 -1,909:-1 - shop qshop2 -1,909:-1 - shop qshop3 -1,909:-1 - shop qshop4 -1,909:-1 - shop qshop5 -1,909:-1 Please help, ill pay if its possible. Thanks.
  17. - script nostoreall2 -1,{ end; OnInit: bindatcmd "storeall",strnpcinfo(0)+"::OnAtcommand"; end; OnAtcommand: if( strcharinfo(3) == "sec_pri" ) end; atcommand "@storeall "+strcharinfo(0)+""; end; } Users can use #storeall to other players How can i fix this? thanks in advance.
  18. Yaoi

    Chat Filter

    thank you all, searching in the forum i found this script, i think it is a little usefull anyway. now im using it, it works great
  19. Yaoi

    Chat Filter

    how can be excluded when someone is promoting servers?, for example if the user is promoting yellow- ro, when they type the enter key nothing happends, the messeage doesnt send. So I would like a script where I can add forbidden words in the normal chat.
  20. Yaoi

    PvP Hour Reward

    thank you all very much :D
  21. Hi i would like to have a script like this to make a great pvp hour full of users 1. Only When it is @time 22:00 this script starts 2. When killing another user they recieve a certain coin per every kill [ poring coins 7539] 3. This script only work in certain map [ guild_vs2 ] 4. When it is @time 23:00 the script ends
  22. Yaoi

    AUTOTRADE REWARD

    Im new to this and not good scripting, if someone could make the full script please. T.T
  23. hi, I would like to get a script that reward certain item every hour to autotrade users only. similar to the hourlypoints script. Autotrade users recieve 2 Platinium Coins (id 677) every 1 hour, Users cannot have more than 1 Shop in autotrade mode ( ip block)
×
×
  • Create New...

Important Information

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