Famous Posted August 7, 2012 Share Posted August 7, 2012 (edited) Need ncp shop Script Vote for points using jaypee Edited August 7, 2012 by zhen Quote Link to comment Share on other sites More sharing options...
Euphy Posted August 7, 2012 Share Posted August 7, 2012 It's included in his release... Quote Link to comment Share on other sites More sharing options...
Famous Posted August 7, 2012 Author Share Posted August 7, 2012 can you giv me link please?? Quote Link to comment Share on other sites More sharing options...
clydelion Posted August 7, 2012 Share Posted August 7, 2012 Download from his github. https://github.com/mandark022/VoteForPoints/zipball/master Open the zip file, and there's a 'npc' folder inside.. Quote Link to comment Share on other sites More sharing options...
Famous Posted August 7, 2012 Author Share Posted August 7, 2012 (edited) @euphy : I already try this script http://rathena.org/b...npc/#entry87804 <-- (I have 4 points on a flux but in game it says 0 points) @ clydelion I already tried this script npc may be I have something wrong on my addons Edited August 7, 2012 by zhen Quote Link to comment Share on other sites More sharing options...
Euphy Posted August 7, 2012 Share Posted August 7, 2012 I wrote an alternative a while ago: - script VotePointConvert -1,{ OnPCLoginEvent: query_sql("SELECT `points` FROM `cp_v4p_voters` WHERE account_id="+getcharid(3)+" LIMIT 1",[email protected]); if ([email protected]) end; query_sql("UPDATE `cp_v4p_voters` SET points=(points-"[email protected]+") WHERE account_id='"+getcharid(3)+"'"); set #VOTEPOINTS, #[email protected]; dispbottom "Vote Points updated! Total: "+#VOTEPOINTS; end; } Then use my quest shop with the variable as #VOTEPOINTS. Quote Link to comment Share on other sites More sharing options...
Famous Posted August 8, 2012 Author Share Posted August 8, 2012 @ Euphy Thanks I will try this now I've Tried to use this two script But the result is Failed I have 0 Vote4points in game.. I also try your script change the edit the variable #VOTEPOINTS //=========================================//By : goddameit //Ver : 1.21.19 //========================================= - shop dyn_shop1 -1,501:50 //========================================= umbala,100,154,0 script DynamicShop 123,{ mes ""[email protected]$+":["+getd([email protected]$)+"]"; close2; callshop "dyn_shop1",1; npcshopattach "dyn_shop1"; end; OnInit: //========================================= set [email protected]$,"#VOTEPOINTS"; //========================================= setarray [email protected]_id[0],501,502; setarray [email protected]_co[0],4,20; //========================================= npcshopitem "dyn_shop1",[email protected]_id[0],[email protected]_co[0]; for(set .ik,1;.ik<getarraysize([email protected]_id);set .ik,.ik+1){ npcshopadditem "dyn_shop1",[email protected]_id[.ik],[email protected]_co[.ik]; } end; OnBuyItem: if(@bought_quantity[@i] <= 0){ goto OnEnrd; end; } for(set @i,0;@i<getarraysize(@bought_nameid);set @i,@i+1){ for(set @i2,0;@i2<getarraysize([email protected]_id);set @i2,@i2+1){ if(@bought_nameid[@i][email protected]_id[@i2]){ set @gh,@[email protected]_co[@i2]*@bought_quantity[@i]; set @wh,@wh+getiteminfo(@bought_nameid[@i],6); } } } if(getd([email protected]$)<@gh){ announce "[D-Shop]:["[email protected]$+"] isn't enough",bc_self; goto OnEnrd; end; }else{ if(@wh>(MaxWeight-Weight)){ announce "[D-Shop]:Too heavy",bc_self; goto OnEnrd; end; }else{ set getd([email protected]$),getd([email protected]$)[email protected]; for(set @i,0;@i<getarraysize(@bought_nameid);set @i,@i+1){ getitem @bought_nameid[@i],@bought_quantity[@i]; } } } OnEnrd: set @gh,0; set @wh,0; set @i,0; set @i2,0; deletearray @bought_quantity,getarraysize(@bought_quantity); deletearray @bought_nameid,getarraysize(@bought_nameid); end; } //===== rAthena Script =======================================//= Cash Shop NPCs //===== By: ================================================== //= L0ne_W0lf //===== Current Version: ===================================== //= 1.1 //===== Compatible With: ===================================== //= rAthena SVN //===== Description: ========================================= //= Sell Cash shop items. //= Based on iRO's Cash shop. Headgears omitted. //===== Additional Comments: ================================= //= 1.0 First Version. Sample shop per-say. //= 1.1 FIxed typo. (bugreport:1078) [L0ne_W0lf] //============================================================ // Payon //============================================================ // Sells: // Battle Manual Box, Life Insurance Box, Bubble Gum Box, // Kafra Card Box, Giant Fly Wing Box, Neuralizer Box, // Token of Ziegfried Box, Enriched Oridecon and Elunium, // Assumpito, Wind Walk, Aspersio, Adreniline Rush, // Blessing and Increase Agility Scroll boxes, Dungeon // Teleport Scroll Box, Stat Food boxes, and Gym Passes. payon,171,142,4 cashshop Kafra Shop Employee 116,12900:1000,12901:200,12902:1000,12909:100,12910:100,12911:1500,12922:150,7619:100,7620:100,12916:150,12917:150,12915:100,12918:100,12913:125,12914:125,13553:50,12903:100,12904:100,12905:100,12906:100,12907:100,12908:100,7776:50 Quote Link to comment Share on other sites More sharing options...