Jump to content
  • 0

TCG Drainer - Very useful to most of the servers (just like Lotti Girl in pRO)


Dvrstle

Question


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  361
  • Reputation:   10
  • Joined:  12/30/11
  • Last Seen:  

I want to request an npc that is almost the same with the Lotti Girl in Philippine Ragnarok Online.

In pRO, this Lotti Girl gives item randomly with the use of a ticket.

So this what I want,

My Tcg drainer npc goes like this, this needs 300 TCG to play the game. . .

The player will choose if he wants to Draw a prize.. . and then a random item will be given...

There's more, the prizes should be based on % chance . . . .

Here's the prizes

**This item will be get by the player if non of the items below was taken.

1 Convex Mirror

**Here are the items which the player can get randomly [With Chances]

25 Yggdrasil Berries - 70%

Gym Pass Box [10pcs of Gym pass] - 70%

Hairband of Reginleif - 40%

Flying Angel Wing - 40%

Evolved Orc Hero Helm - 40%

[Vset] with out the helm - 50%

Orleans Glove - 25%

Glorious Suit - 5%

** If the player got any one of these items which has % chance. . . they will not get the convex mirror. . . in short. . . convex mirror is just a replacement for not getting any rare items. . and another one, there will be a broadcast on the whole server which says that "Congratulations to [Name of the Char] for getting [Name of the item] !!"

I hope that there's a professional scripter here that can make this kind of NPC. . . . and i know that many server will benefit from this because this is also a way of controlling the economy of the server by reducing the items which they use as the medium of exchange. . . Thanks a lot!!

please help me =)

bump~

Link to comment
Share on other sites

Recommended Posts


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  361
  • Reputation:   10
  • Joined:  12/30/11
  • Last Seen:  

Euphy its now working with my server . . . =) . . good job! tnx a lot. .

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  227
  • Reputation:   11
  • Joined:  11/16/11
  • Last Seen:  

@Euphy, is it possible to make an item that is lower than 1% rate? something like 0.1 or so...

Link to comment
Share on other sites


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

@Euphy, is it possible to make an item that is lower than 1% rate? something like 0.1 or so...

Multiply all the %s in config by 10, then change this line to:

rand(1,1000)

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  361
  • Reputation:   10
  • Joined:  12/30/11
  • Last Seen:  

what if i want to use zeny as the required item

Link to comment
Share on other sites


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

Then use Zeny checks instead of item checks. It's not hard to figure out.

if (Zeny < your_amount) { mes "You don't have enough Zeny."; close; } // Check
set Zeny, Zeny - your_amount; // Remove

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1125
  • Reputation:   236
  • Joined:  07/30/12
  • Last Seen:  

Can someone upload this script to pastebin? I wanna try this one. Thank you :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  209
  • Topics Per Day:  0.05
  • Content Count:  892
  • Reputation:   27
  • Joined:  12/09/11
  • Last Seen:  

Can someone upload this script to pastebin? I wanna try this one. Thank you :)

why you don't do it.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  138
  • Reputation:   1
  • Joined:  12/27/11
  • Last Seen:  

Thx for this script euphy. I like the concept of this script.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  73
  • Reputation:   2
  • Joined:  12/19/11
  • Last Seen:  

if (getd(".P"+.@i+"[0]")<=10 && .@k[0]!=.Default[0]) announce // ...

where to put this line?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  61
  • Reputation:   0
  • Joined:  10/14/12
  • Last Seen:  

sir why i cant acces it im always stocked at (here we go) damn !!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  132
  • Reputation:   2
  • Joined:  02/02/12
  • Last Seen:  

Then use Zeny checks instead of item checks. It's not hard to figure out.

if (Zeny < your_amount) { mes "You don't have enough Zeny."; close; } // Check
set Zeny, Zeny - your_amount; // Remove

Hey Euphy, how about cashpoints/kafra points, What do I have to change to use them instead of zeny/tcg?

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

c

Then use Zeny checks instead of item checks. It's not hard to figure out.

if (Zeny < your_amount) { mes "You don't have enough Zeny."; close; } // Check
set Zeny, Zeny - your_amount; // Remove

Hey Euphy, how about cashpoints/kafra points, What do I have to change to use them instead of zeny/tcg?

change zeny to

#CASHPOINTS
#KAFRAPOINTS

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  73
  • Reputation:   2
  • Joined:  12/19/11
  • Last Seen:  

if (getd(".P"+.@i+"[0]")<=10 && .@k[0]!=.Default[0]) announce // ...

sir Emistry can u help me? where to put this line? to make the npc announce when the player gets rare item.

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

try put it before the getitem command ?

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  28
  • Topics Per Day:  0.01
  • Content Count:  146
  • Reputation:   1
  • Joined:  11/22/11
  • Last Seen:  

Hello Euphy! it worked perfectly on my server. Thank you.

@TS

thank you for making this thread =)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   0
  • Joined:  01/25/13
  • Last Seen:  

gagana po ba to sa eathena?

prontera,139,229,5 script Lotti Girl 864,{

mes "[Lotti Girl]";

mes "It costs "+ .cost[1] +"x "+ getitemname( .cost[0] ) +" to play.";

mes " ";

for ( .@i = 0; .@i < 20; .@i++ )

mes $lotti_girl_ladder$[.@i];

if ( countitem( .cost[0] ) < .cost[1] ) close;

next;

if ( select( "Deal me in!", "No way..." ) == 2 ) close;

mes "[Lotti Girl]";

while (1) {

mes "Here we go...";

delitem .cost[0], .cost[1];

.@rand = rand(.totalchance);

.@r = 0; // <-- think you forgot to put this

while ( ( .@rand = .@rand - getd( ".p"+ .@r +"[0]" ) ) >= 0 ) .@r++;

.@size = getarraysize( getd(".p"+ .@r ) );

for ( .@i = 1; .@i < .@size; .@i += 2 )

getitem getd( ".p"+ .@r +"["+ .@i +"]" ), getd( ".p"+ .@r +"["+( .@i +1 )+"]" );

if ( getd( ".p"+ .@r +"[0]" ) < 50 ) // announce if below 50% chance

announce "Congratulations to "+strcharinfo(0)+" for getting "+ .ann$[.@r] +"!", 0;

if ( getd( ".p"+ .@r +"[0]" ) < 10 ) { // score the ladder if below 10% chance

copyarray $lotti_girl_ladder$[1], $lotti_girl_ladder$[0], 19;

$lotti_girl_ladder$ = strcharinfo(0) +" gains "+ .ann$[.@r] +" at "+ gettimestr( "%d/%m/%Y %H:%M %p", 21 );

}

mes " ";

mes "wanna try again ?";

next;

if ( select( "Yes", "No" ) == 2 ) close;

mes "[Lotti Girl]";

if ( countitem( .cost[0] ) < .cost[1] ) {

mes "it seems you have ran out of "+ getitemname( .cost[0] );

close;

}

}

close;

OnInit:

// setarray .p1, 70, 501,25; // debugging ...

// setarray .p2, 70, 502,1;

// setarray .p3, 40, 503,1;

// setarray .p4, 40, 504,1;

// setarray .p5, 40, 505,1;

// setarray .p6, 50, 506,1, 507,1, 508,1, 509,1;

// setarray .p7, 25, 512,1;

// setarray .p8, 5, 513,1;

setarray .p1, 70, 14232,1;

setarray .p2, 10, 2115,1;

setarray .p3, 50, 13582,1;

setarray .p4, 40, 5210,1;

setarray .p5, 10, 2421,1;

setarray .p6, 5, 2524,1;

setarray .p7, 5, 2357,1;

setarray .p8, 5, 2729,1;

setarray .p9, 30+30+60+60+60+50+75+95, 7040,1; // default ... the chance are added up by 100-n%

setarray .cost, 7227,1;

.total = 9;

freeloop 1;

.@i = 1;

while ( .@i <= .total ) {

.totalchance = .totalchance + getd(".p"+ .@i );

.@j = 1;

.@size = getarraysize( getd(".p"+ .@i ) );

while ( .@j < .@size ) {

.ann$[.@i] = .ann$[.@i] + getd( ".p"+ .@i +"["+( .@j +1 )+"]" ) +"x "+ getitemname( getd( ".p"+ .@i +"["+ .@j +"]" ) ) +( ( .@j == .@size -2 )? "":"," ); // I think Euphy forgotten to make announcement when configuration has set more than 1 items

.@j += 2;

}

.@i++;

}

freeloop 0;

}

lottiNPC.txt

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

×   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...