Jump to content

noobsai

Members
  • Posts

    70
  • Joined

  • Last visited

Everything posted by noobsai

  1. i cant find the client 2010-07-30 can someone give me link so i can diff with md5 hash thanks
  2. very nice and simple 9/10 .. keep it up bro
  3. Hi this is a code from si jaypee's v4p npc.. but the problem is when i add a new category example.. category1 and category2... when i add items on category2 then select category2 its supposed to show only the items i added on category 2 but it also shows the item on category 1,, any solution with this? //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,151,175,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"); add_item(607,1,10,"Ygg"); //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(.@detail$ == "ItemID") return @ItemID[.@key]; else if((.@detail$ == "Quantity") || (.@detail$ == "quantity")) return @itemQ[.@key]; else if((.@detail$ == "Points") || (.@detail$ == "points")) return @points[.@key]; else if((.@detail$ == "Category") || (.@detail$ == "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(.@selectedCat$ == @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; } } i use eathena bump ! still needed this
  4. i am using eathena and used the eathena npc. but the category style won't effect,, example.. category1 and category2 i added 2 items on category 1 and 3items on category 2. when i select category 2 it's supposed to show only 3 items but the problem is the items on category 1 is also there .. T_T
  5. how can i fix my problem there are times that when we log in it says unregistered ID so we need to restart the server again xD help pls
  6. works fine now thanks for the help
  7. hi how to fix my GRF i have two Grf's on my server (ex. grf1 and grf2) i patched my new act and .spr's which is tested and working on my data folder but when i upload it as patched together with lua files and etc. and place it on grf1 when i @item the item doesnt have icon and gets error when clicked. but when i place it on grf2 it doesnt error. xD my grf priority is like this 0=grf1.grf 1=grf2.grf 2=rdata.grf 3=data.grf
  8. i think this script already existed, I just can't find it can someone help me with this GM autohides and uses @speed 0 upon logging in
  9. okay thanks for the help guys i will be trying this
  10. i wonder why it doesnt work to me the thing i did to remove the card is make it 0,0 but it doesnt drop when i use @Monster and @killmonster
  11. yea i tried to remove but no card drops on thana even i change it to 10000
  12. trying this now tyvm sir emistry i cant find the card rate when i use @mi on the boss
  13. is there any script that makes some of MVP card 10% drop instead of 40% this is my drops.conf. 75% for normal cards and 40% for MVP but it applies event in thana card item_rate_card: 750000 item_rate_card_boss: 400000 item_drop_card_min: 1 item_drop_card_max: 10000 i used this script - script CustomDropRates -1,{ OnInit: setarray $@MobOkay_ID[0],1708,1646,1647,1648,1649,1650,1651,1871,1768; //Replace XXXX with the ID's of the monsters you want to be affected by this script. Add more as necessariy. *Note only supports 128 different monsters* set $@MaxDropChance,10;end; OnNPCKillEvent: for(set @i,0; @i<getarraysize($@MobOkay_ID); set @i,@i+1) {if (killedrid==$@MobOkay_ID[@i]) {callfunc "DropItemRate";}} end; } function script DropItemRate { set @i,0; set @dropID,0; deletearray $@MobDrop_item[0],128; getmobdrops(killedrid); goto iDropItemLoop; iDropItemLoop: set @i,rand(1,$@MaxDropChance); if (@dropID == $@MobDrop_count){dispbottom "Success"; end;} if (@i==1 && $@MobDrop_rate[@dropID]<=1) {getitem $@MobDrop_item[@dropID],1; set @dropID,@dropID+1; goto iDropItemLoop;} if (@i<=$@MaxDropChance){set @dropID,@dropID+1; goto iDropItemLoop;} end; } but it makes my thana to 0.1% and other modified cards any other script you can share? bump still need this
  14. can i ask a script for an npc that resets Hatred (skill of taekwon) thx
  15. no idea on how to do backup hahaha sry still noob
  16. how can i prevent my server from wipe out when i change my VPS host.. the host im on now is bit lag and i want to transfer it but i dont know what to do to prevent any loss of items or wipeout
  17. problem solved .. I just put a comment before the item just like sir emistry said
  18. is this possible to delete all players who have this item ex.item ID(20000) if they have that item it will be gone..
  19. hi.. i got this problem when woe started in fadhrigdh after some minute it announced that the castle fadhrigdh is abandoned when i went inside the emperium is not there anymore.. but the timer says 30mins left how to fix that? i used GM Xeon's woe setter help pls
×
×
  • Create New...