Jump to content

Need ncp shop Script Vote for points using jaypee


Recommended Posts


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.03
  • Content Count:  455
  • Reputation:   3
  • Joined:  06/19/12
  • Last Seen:  

Need ncp shop Script Vote for points using jaypee

Edited by zhen
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1132
  • Joined:  05/27/12
  • Last Seen:  

It's included in his release...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.03
  • Content Count:  455
  • Reputation:   3
  • Joined:  06/19/12
  • Last Seen:  

can you giv me link please??

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

Download from his github.

https://github.com/mandark022/VoteForPoints/zipball/master

Open the zip file, and there's a 'npc' folder inside..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.03
  • Content Count:  455
  • Reputation:   3
  • Joined:  06/19/12
  • Last Seen:  

@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 by zhen
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1132
  • Joined:  05/27/12
  • Last Seen:  

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",.@points);
   if (!.@points) end;
   query_sql("UPDATE `cp_v4p_voters` SET points=(points-"+.@points+") WHERE account_id='"+getcharid(3)+"'");
   set #VOTEPOINTS, #VOTEPOINTS+.@points;
   dispbottom "Vote Points updated! Total: "+#VOTEPOINTS;
   end;
}

Then use my quest shop with the variable as #VOTEPOINTS.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.03
  • Content Count:  455
  • Reputation:   3
  • Joined:  06/19/12
  • Last Seen:  

@

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 ""+$@Cost$+":["+getd($@Cost$)+"]";

close2;

callshop "dyn_shop1",1;

npcshopattach "dyn_shop1";

end;

OnInit:

//=========================================

set $@Cost$,"#VOTEPOINTS";

//=========================================

setarray $@buy_id[0],501,502;

setarray $@buy_co[0],4,20;

//=========================================

npcshopitem "dyn_shop1",$@buy_id[0],$@buy_co[0];

for(set .ik,1;.ik<getarraysize($@buy_id);set .ik,.ik+1){

npcshopadditem "dyn_shop1",$@buy_id[.ik],$@buy_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($@buy_id);set @i2,@i2+1){

if(@bought_nameid[@i]==$@buy_id[@i2]){

set @gh,@gh+$@buy_co[@i2]*@bought_quantity[@i];

set @wh,@wh+getiteminfo(@bought_nameid[@i],6);

}

}

}

if(getd($@Cost$)<@gh){

announce "[D-Shop]:["+$@Cost$+"] 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($@Cost$),getd($@Cost$)-@gh;

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...