Jump to content
  • 0
Sign in to follow this  
mybitch

R> PvP Points shop using this script

Question

3 answers to this question

Recommended Posts

  • 0

Try the following :

 

1. On that script, find :

OnPCKillEvent:	if ( getgmlevel() >= .gmnokill ) end;	getmapxy .@map$, .@x, .@y, 0;

2. Change to :

OnPCKillEvent:	if ( getgmlevel() >= .gmnokill ) end;	getmapxy .@map$, .@x, .@y, 0;    set #KILLPOINTS, #KILLPOINTS + 1;

3. Use this script or multi-currency shop by @Emistry :

-	shop	dynamicshop	-1,501:50prontera,150,150,0	script	Dynamic Shop	100,{    callshop "dynamicshop",1;    npcshopattach "dynamicshop";    end;        OnBuyItem:        for ( set .@j, 0; .@j < getarraysize(.items); set .@j, .@j + 2 ) {            for ( set .@k, 0; .@k < getarraysize(@bought_nameid); set .@k, .@k + 1 ) {                if ( @bought_nameid[.@k] == .items[.@j] ) {                    if ( checkweight( @bought_nameid[.@k], @bought_quantity[.@k] ) ) {                        if ( .currency < .items[.@j+1] )                            dispbottom "You don't have enough kill points to purchase this item.";                        else {                            .currency -= .items[.@j+1] * @bought_quantity[.@k];                            getitem @bought_nameid[.@k], @bought_quantity[.@k];                        }                    } else dispbottom "You cannot carry out more items with you";                }            }        }        deletearray @bought_quantity, getarraysize(@bought_quantity);        deletearray @bought_nameid, getarraysize(@bought_nameid);        end;    OnInit:        set .currency, "#KILLPOINTS"; // kill points is used to buy items        setarray .items, 4001,5,7227,100,7179,50,4002,5,4003,4,4004,2; // Usage : <item id>,<price>        npcshopitem "dynamicshop",0,0;        for ( set .@i, 0; .@i < getarraysize(.items); set .@i, .@i + 2 )            npcshopadditem "dynamicshop", .items[.@i], .items[.@i+1];        end;}

4. Configuration :

- Put all the items you want to sell with kill points. Check usage.

setarray .items, 4001,5,7227,100,7179,50,4002,5,4003,4,4004,2; // Usage : <item id>,<price>

5. Found error? Report it here, show your console command.

 

 

PS : don't know if this will work. never tried on my test server as i am doing a lot of things.

Edited by Patskie

Share this post


Link to post
Share on other sites
  • 0

 

Try the following :

 

1. On that script, find :

OnPCKillEvent:	if ( getgmlevel() >= .gmnokill ) end;	getmapxy .@map$, .@x, .@y, 0;
2. Change to :
OnPCKillEvent:	if ( getgmlevel() >= .gmnokill ) end;	getmapxy .@map$, .@x, .@y, 0;    set #KILLPOINTS, #KILLPOINTS + 1;
3. Use this script or multi-currency shop by @Emistry :
-	shop	dynamicshop	-1,501:50prontera,150,150,0	script	Dynamic Shop	100,{    callshop "dynamicshop",1;    npcshopattach "dynamicshop";    end;        OnBuyItem:        for ( set .@j, 0; .@j < getarraysize(.items); set .@j, .@j + 2 ) {            for ( set .@k, 0; .@k < getarraysize(@bought_nameid); set .@k, .@k + 1 ) {                if ( @bought_nameid[.@k] == .items[.@j] ) {                    if ( checkweight( @bought_nameid[.@k], @bought_quantity[.@k] ) ) {                        if ( .currency < .items[.@j+1] )                            dispbottom "You don't have enough kill points to purchase this item.";                        else {                            delitem .currency, .items[.@j+1] * @bought_quantity[.@k];                            getitem @bought_nameid[.@k], @bought_quantity[.@k];                        }                    } else dispbottom "You cannot carry out more items with you";                }            }        }        deletearray @bought_quantity, getarraysize(@bought_quantity);        deletearray @bought_nameid, getarraysize(@bought_nameid);        end;    OnInit:        set .currency, "#KILLPOINTS"; // kill points is used to buy items        setarray .items, 4001,5,7227,100,7179,50,4002,5,4003,4,4004,2; // Usage : <item id>,<price>        npcshopitem "dynamicshop",0,0;        for ( set .@i, 0; .@i < getarraysize(.items); set .@i, .@i + 2 )            npcshopadditem "dynamicshop", .items[.@i], .items[.@i+1];        end;}
4. Configuration :

- Put all the items you want to sell with kill points. Check usage.

setarray .items, 4001,5,7227,100,7179,50,4002,5,4003,4,4004,2; // Usage : <item id>,<price>
5. Found error? Report it here, show your console command.

 

 

PS : don't know if this will work. never tried on my test server as i am doing a lot of things.

 

Will this count if the player keeps feeding. cause there's a condition on the script that will rollback the score if found out that players are just feeding them with points.

Edited by Emistry
removed double quoting.

Share this post


Link to post
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
Answer this question...

×   Pasted as rich text.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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