Jump to content

lieneil

Members
  • Posts

    39
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling
  • Location
    philippines

Recent Profile Visitors

1583 profile views

lieneil's Achievements

Poring

Poring (1/15)

0

Reputation

  1. thanks for your concern sir emistry but this does not work.. when i click to my cash shop npc the points wont be counted... help me please some one that has successfully done this by the way it's sir jaypee's vote points npc.. thanks.. help please.. somebody who know how to deal with this.. thanks..
  2. //==================================================================================== //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 //==================================================================================== royal_room3,80,136,5 script VoteForPoints 89,{ //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$,"[ Vote For Points ]"; //Initialization of the Rewards add_item(555,1,100,"Hello"); add_item(556,2,101,"Hello"); add_item(557,3,101,"Hello1"); //Script Start mes .npcname$; mes "Hi! Do you want to exchange your vote points?:"; switch(select("Yes, I want to exchange my points:See my points")) { case 1: next; mes .npcname$; mes "Please choose a category:"; set .@selected,select(makeCategory())-1; next; mes .npcname$; mes "Please the item you want:"; set .@selected,select(getItemsByCat(@listCat$[.@selected]))-1; next; mes .npcname$; set .@ritemid,getItemDetails(@itemKeys[.@selected],"itemid"); set .@rquantity,getItemDetails(@itemKeys[.@selected],"quantity"); set .@rpoints,getItemDetails(@itemKeys[.@selected],"points"); mes "Item ID:"+.@ritemid; mes "Item Name: "+getitemname(.@ritemid); mes "Item Quantity: "+.@rquantity+" pc(s)."; mes "Required Points: "+.@rpoints+" pt(s)."; mes "\n"; mes "Do you want to this item?"; if(select("Yes:No")==1) { set .@points,getPoints(getcharid(3)); if(.@points>=.@rpoints) { next; mes .npcname$; updatePoints(getcharid(3),.@rpoints); getitem .@ritemid,.@rquantity; mes "Here you go!. Thank you for voting. Don't forget to vote again. "; } else mes "Sorry, you do not have enough points for this item."; } else { next; mes .npcname$; mes "Okay bye!"; } garbagecol(); close; case 2: next; mes .npcname$; set .@points,getPoints(getcharid(3)); mes "You currently have "+.@points+" pt(s)."; garbagecol(); close; } end; //Functions Bodies function updatePoints { set .@account_id,getarg(0); set .@usedPoints,getarg(1); query_sql("UPDATE `cp_v4p_voters` SET points=(points-"+.@usedPoints+") WHERE account_id='"+.@account_id+"'"); return; } function getPoints { set .@account_id,getarg(0); query_sql("SELECT `points` FROM `cp_v4p_voters` WHERE account_id="+.@account_id+" LIMIT 1",.@points); if(getarraysize(.@points)==0) return 0; return .@points[0]; } function getItemDetails { set .@key,getarg(0); //Key set .@detail$,getarg(1); //What details to return such as ItemID, Points, Quantity, Category if(strtolower(.@detail$) == strtolower("ItemID")) return @itemID[.@key]; else if(strtolower(.@detail$) == strtolower("Quantity")) return @itemQ[.@key]; else if(strtolower(.@detail$) == strtolower("Points")) return @points[.@key]; else if(strtolower(.@detail$) == strtolower("Category")) return @category$[.@key]; } function getItemsByCat { set .@selectedCat$,getarg(0); set .@make_string$,""; set .@x,0; for(set .@i,0; .@i<getarraysize(@category$); set .@i,.@i+1) { if(strtolower(.@selectedCat$) == strtolower(@category$[.@i])) { setarray @itemKeys[.@x],.@i; if(.@make_string$ == "") set .@make_string$,getitemname(@itemID[.@i]); else set .@make_string$,.@make_string$+":"+getitemname(@itemID[.@i]); set .@x,.@x+1; } } return .@make_string$; } function makeCategory { set .@make_string$,""; for(set .@i,0; .@i<getarraysize(@category$); set .@i,.@i+1) { if(.@make_string$ == "") { setarray @listCat$[getarraysize(@listCat$)],@category$[.@i]; set .@make_string$,@category$[.@i]; } else { if(compare(.@make_string$,@category$[.@i])==0) { setarray @listCat$[getarraysize(@listCat$)],@category$[.@i]; set .@make_string$,.@make_string$+":"+@category$[.@i]; } } } return .@make_string$; } function add_item { set .@itemID,getarg(0,-1); //IteID set .@itemQ,getarg(1,-1); //Item Quantity set .@points,getarg(2,-1); set .@cat$,getarg(3,"Uncategorized"); //Category if(.@itemID == -1) { debugmes "Invalid Item ID. Script not completely loaded."; end; } else if(.@itemQ == -1) { debugmes "Invalid Item Quantity. Script not completely loaded."; end; } else if(.@points == -1) { debugmes "Points assignment error. Script not completely loaded."; end; } set .@key,getarraysize(@itemID); setarray @itemID[.@key],.@itemID; setarray @itemQ[.@key],.@itemQ; setarray @points[.@key],.@points; setarray @category$[.@key],.@cat$; 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; } } please help me with this.. I'm having a hard time understanding how this script gives points.. well I kinda figured out how it give points but converting the points here makes me confused. well just want to ask how can i make this script converted to kafra points or cashpoints.. thanks and hope you will help me..
  3. squeeze is very right... i cant explain it more since i dont have more information about this. well i cant find this script thats why im requesting it hoping that someone that has this script can share it with me..
  4. can you share this npc script please.. thanks a lot..
  5. sorry for my first post. well im looking for a customized THQ shop in which instead of cards. it is castle drop. and i know some of the highrate trans job server has this script. can you please share it with me? thanks a lot... i badly need it. thanks for those who will help me..
  6. guys! how to make rathena server renewal to become rathena pre-renewal? without the 3rd job's even the quest for them. hope someone can guide me with this.. thanks a lot..
  7. hello everyone!! my server is now using the eathena emulator right now.. wel i just want to upgade my eathena server to rathena. by the way my server is a trans job only server. is there an rathena that only support trans job? well if there is. can you please teach me how to upgrade my server from eathena to rathena. and also i dont want to loose my players items. well i dont want a roll back. and one more thing. the reason i want to upgrade my server log in crashes when skill is being spamed so as a high rate private server we need an emulator that wont crash when using spam skill.. thanks alot..
  8. so guys here's my problem.. so i changed my phpmyadmin's password.. so i put the new phpmyadmin password in server.php and in inter_athena.conf... so my problem is i am having a critical error with my site... and now im really worried about my server... how to fix this?? when im using my old phpmyadminpassword the site is working preety good.. help me... please help me i beg you...
  9. //==================================================================================== //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 //==================================================================================== prontera,140,177,4 script VoteForPoints 89,{ //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$,"[ Vote For Points ]"; //Initialization of the Rewards add_item(674,1,1,"Vote Token"); //Script Start mes .npcname$; mes "Hi! Do you want to exchange your vote points?:"; switch(select("Yes, I want to exchange my points:See my points")) { case 1: next; mes .npcname$; mes "Please choose a category:"; set .@selected,select(makeCategory())-1; next; mes .npcname$; mes "Please the item you want:"; set .@selected,select(getItemsByCat(@listCat$[.@selected]))-1; next; mes .npcname$; set .@ritemid,getItemDetails(@itemKeys[.@selected],"itemid"); set .@rquantity,getItemDetails(@itemKeys[.@selected],"quantity"); set .@rpoints,getItemDetails(@itemKeys[.@selected],"points"); mes "Item ID:"+.@ritemid; mes "Item Name: "+getitemname(.@ritemid); mes "Item Quantity: "+.@rquantity+" pc(s)."; mes "Required Points: "+.@rpoints+" pt(s)."; mes "n"; mes "Do you want to this item?"; if(select("Yes:No")==1) { set .@points,getPoints(getcharid(3)); if(.@points>=.@rpoints) { next; mes .npcname$; updatePoints(getcharid(3),.@rpoints); getitem .@ritemid,.@rquantity; mes "Here you go!. Thank you for voting. Don't forget to vote again. "; } else mes "Sorry, you do not have enough points for this item."; } else { next; mes .npcname$; mes "Okay bye!"; } garbagecol(); close; case 2: next; mes .npcname$; set .@points,getPoints(getcharid(3)); mes "You currently have "+.@points+" pt(s)."; garbagecol(); close; } end; //Functions Bodies function updatePoints { set .@account_id,getarg(0); set .@usedPoints,getarg(1); query_sql("UPDATE `cp_v4p_voters` SET points=(points-"+.@usedPoints+") WHERE account_id='"+.@account_id+"'"); return; } function getPoints { set .@account_id,getarg(0); query_sql("SELECT `points` FROM `cp_v4p_voters` WHERE account_id="+.@account_id+" LIMIT 1",.@points); if(getarraysize(.@points)==0) return 0; return .@points[0]; } function getItemDetails { set .@key,getarg(0); //Key set .@detail$,getarg(1); //What details to return such as ItemID, Points, Quantity, Category if(strtolower(.@detail$) == strtolower("ItemID")) return @itemID[.@key]; else if(strtolower(.@detail$) == strtolower("Quantity")) return @itemQ[.@key]; else if(strtolower(.@detail$) == strtolower("Points")) return @points[.@key]; else if(strtolower(.@detail$) == strtolower("Category")) return @category$[.@key]; } function getItemsByCat { set .@selectedCat$,getarg(0); set .@make_string$,""; set .@x,0; for(set .@i,0; .@i<getarraysize(@category$); set .@i,.@i+1) { if(strtolower(.@selectedCat$) == strtolower(@category$[.@i])) { setarray @itemKeys[.@x],.@i; if(.@make_string$ == "") set .@make_string$,getitemname(@itemID[.@i]); else set .@make_string$,.@make_string$+":"+getitemname(@itemID[.@i]); set .@x,.@x+1; } } return .@make_string$; } function makeCategory { set .@make_string$,""; for(set .@i,0; .@i<getarraysize(@category$); set .@i,.@i+1) { if(.@make_string$ == "") { setarray @listCat$[getarraysize(@listCat$)],@category$[.@i]; set .@make_string$,@category$[.@i]; } else { if(compare(.@make_string$,@category$[.@i])==0) { setarray @listCat$[getarraysize(@listCat$)],@category$[.@i]; set .@make_string$,.@make_string$+":"+@category$[.@i]; } } } return .@make_string$; } function add_item { set .@itemID,getarg(0,-1); //IteID set .@itemQ,getarg(1,-1); //Item Quantity set .@points,getarg(2,-1); set .@cat$,getarg(3,"Uncategorized"); //Category if(.@itemID == -1) { debugmes "Invalid Item ID. Script not completely loaded."; end; } else if(.@itemQ == -1) { debugmes "Invalid Item Quantity. Script not completely loaded."; end; } else if(.@points == -1) { debugmes "Points assignment error. Script not completely loaded."; end; } set .@key,getarraysize(@itemID); setarray @itemID[.@key],.@itemID; setarray @itemQ[.@key],.@itemQ; setarray @points[.@key],.@points; setarray @category$[.@key],.@cat$; 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; } } so i want to make the npc give vote token on the players desired amount.. the npc gives one token per talk to him. so i want it to have an option of leting the player choose the amount of token they want to get.. thanks hope you can help me.. help please.... help me please.... help please....
  10. hello!! im here again.. i just want to ask how can i put a delay on HJ.. thanks hope you can help me with this..
  11. so my server goes lag when woe time which is not happening when my server doesnt have automated events. so i think its th automated events that causes the server to lag when woe time. so how can i disable automated events when woe is started? hope you can help me thanks alot..
  12. guys why does my castle always goes open even i deleted the content of the default agit controller. so for example i set kriemhild as my only agit that is available by using toasty's woe controller. but still other castle's are opening. please help me.. as a little explanation i want to control my woe to be castle only but can control every castle to be adjust on what i want to be the agit that day.
  13. //===== eAthena Script ======================================= //= War of Emperium (Prontera) //===== By: ================================================== //= L0ne_W0lf //===== Current Version: ===================================== //= 1.3 //===== Compatible With: ===================================== //= eAthena SVN //===== Description: ========================================= //= NPCs that relate to Prontera Guild Castle 1 //===== Additional Comments: ================================= //= 1.0 First Version. No longer uses functions. [L0ne_W0lf] //= 1.1 Corrected flag-in spawn point. [L0ne_W0lf] //= 1.2 Corrected treasure room switch coordinates. [L0ne_W0lf] //= 1.3 Removed dialog from interior flags. [L0ne_W0lf] //============================================================ // Guild Flag (Town) //============================================================ prontera,143,203,2 script Fadhgridh#p3-1::Fadhgridh 722,{ end; OnRecvCastlePt03: FlagEmblem GetCastleData("prtg_cas03",1); end; } // Guild Flag (Outside Castle) //============================================================ prt_gld,147,140,4 script Fadhgridh#p3-2::Fadhgridh2 722,{ set .@GID, GetCastleData("prtg_cas03",1); if (.@GID == 0) { mes " [ Edict of the Divine Rune Midgard Kingdom ]"; mes " "; mes "1. Follow the ordinance of The Divine Rune Midgard Kingdom, "; mes "We declare that"; mes "there is no formal master of this castle."; mes " "; mes "2. To the one who can "; mes "overcome all trials"; mes "and destroy the Emperium,"; mes "the king will endow the one with"; mes "ownership of this castle."; } else { if (getcharid(2) == .@GID) { mes "Brave ones..."; mes "Do you wish to return to your honorable place?"; next; if (select("Return to the guild castle.:Quit.") == 1) { if (getcharid(2) == GetCastleData("prtg_cas03",1)) { warp "prtg_cas03",181,215; end; } } close; } mes "[ Edict of the Divine Rune Midgard Kingdom ]"; mes " "; mes "1. Following the ordinance of the"; mes "Divine Rune Midgard Kingdom,"; mes "we approve that this place is in"; mes "the private possession of ^ff0000" + GetGuildName(.@GID) + "^000000 Guild."; mes " "; mes "2. The guild Master of ^ff0000"+ GetGuildName(.@GID) + "^000000 Guild is"; mes "^FF0000" + GetGuildMaster(.@GID) + "^000000"; mes "If there is anyone who objects to this,"; mes " prove your strength and honor with a steel blade in your hand."; } close; OnRecvCastlePt03: FlagEmblem GetCastleData("prtg_cas03",1); end; } prt_gld,147,136,4 duplicate(Fadhgridh2) Fadhgridh#p3-3 722 prt_gld,158,140,4 duplicate(Fadhgridh2) Fadhgridh#p3-4 722 prt_gld,158,136,4 duplicate(Fadhgridh2) Fadhgridh#p3-5 722 // Guild Flag (Inside Castle) //============================================================ prtg_cas03,168,28,4 script Fadhgridh#p3-6::Fadhgridh3 722,{ end; OnRecvCastlePt03: FlagEmblem GetCastleData("prtg_cas03",1); end; } prtg_cas03,182,28,4 duplicate(Fadhgridh3) Fadhgridh#p3-7 722 prtg_cas03,43,50,4 duplicate(Fadhgridh3) Fadhgridh#p3-8 722 prtg_cas03,48,50,4 duplicate(Fadhgridh3) Fadhgridh#p3-9 722 prtg_cas03,43,58,4 duplicate(Fadhgridh3) Fadhgridh#p3-10 722 prtg_cas03,48,58,4 duplicate(Fadhgridh3) Fadhgridh#p3-11 722 prtg_cas03,158,210,4 duplicate(Fadhgridh3) Fadhgridh#p3-12 722 prtg_cas03,169,210,4 duplicate(Fadhgridh3) Fadhgridh#p3-13 722 prtg_cas03,162,201,4 duplicate(Fadhgridh3) Fadhgridh#p3-14 722 prtg_cas03,165,201,4 duplicate(Fadhgridh3) Fadhgridh#p3-15 722 // AGIT Manager //============================================================ prtg_cas03,17,221,0 duplicate(Gld_Agit_Manager) Agit#prtg_cas03 -1 // Steward //============================================================ prtg_cas03,51,100,4 duplicate(Gld_Mngr_Template) Sttick#prtg_cas03 55 // Guardians //============================================================ prtg_cas03,51,100,4 duplicate(Gld_Guard_Template) Guardian#prtg_cas03 -1 // Kafra Staff //============================================================ prtg_cas03,181,215,4 duplicate(Gld_Kafra_Template) Kafra Staff#prtg_cas03 117 // Master's Room Exit //============================================================ prtg_cas03,193,130,0 script #switch_Pt03 111,{ mes " "; mes "There's a small lever. Will you pull it? "; next; if(select("Pull.:Do not.") == 2) close; warp "prtg_cas03",51,101; end; } // Guild Treasure Protection //============================================================ prtg_cas03,189,132,0 duplicate(Gld_Trea_Protect) ban_warp#prtg_cas03 -1,6,6 // Guild Treasure Spawns //============================================================ prtg_cas03,189,132,0 duplicate(Gld_Trea_Spawn) Treasure#prtg_cas03 -1 // Guild Dungeon Switch //============================================================ prtg_cas03,5,70,0 duplicate(Gld_Dun_Template) #prtg_cas03 111 here my example.. solved it my self.
×
×
  • Create New...