Jump to content
  • 0

Premium Account Script


Rhaven

Question


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  56
  • Reputation:   1
  • Joined:  11/09/12
  • Last Seen:  

A premium account npc that change the group_id for 1 month and permanent and exchange for specific item.

example:

Option 1 = Premium for 1 month => Group_id change to 1 and exchange for apple(512)

Option 2 = Premium permanently => Group_id change to 1 and exchange for banana(513)

Link to comment
Share on other sites

9 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  56
  • Reputation:   1
  • Joined:  11/09/12
  • Last Seen:  

bump!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   1
  • Joined:  12/29/12
  • Last Seen:  

hello

use search ... but you can try this scripted by AnnieRuru

i request this to modified something.. but this is for Premium Account ..

// ~~~~~ show time left in days, hours, minutes and seconds ~~~~~
function script timeleft__ {
if ( ( .@left = getarg(0) ) <= 0 ) return getarg(0);
.@day = .@left / 86400;
.@hour = .@left % 86400 / 3600;
.@min = .@left % 3600 / 60;
.@sec = .@left % 60;
if ( .@day )
 return .@day +" day "+ .@hour +" hour";
else if ( .@hour )
 return .@hour +" hour "+ .@min +" min";
else if ( .@min )
 return .@min +" min "+ .@sec +" sec";
else
 return .@sec +" sec";
}
prontera,167,178,1 script Player Promoter 436,{
set .@name$,"^228B22[ Player Promoter ]^000000";
mes .@name$;
if ( getgmlevel() == 99 ) {
 mes "Hi Admin, do you want to distribute ^00CC00Player Promoter Cards^000000 with your name on it ?";
 next;
 for ( .@i = 1; .@i <= .total_group; .@i++ )
  .@menu$ = .@menu$ +"Distribute "+ getitemname( .group_idreq[.@i] ) +":";
 .@s = select( .@menu$ );
 getitem2 .group_idreq[.@s], 1,1,0,0, 254, 0, getcharid(0) % ( 1 << 16 ), getcharid(0) >> 16;
 close;
}
else if ( getgmlevel() > 1 ) {
 mes "Only Admin can use me";
 close;
}
for ( .@i = 1; .@i <= .total_group; .@i++ )
 .@menu$ = .@menu$ +( ( getgroupid() < .@i && countitem( .group_idreq[.@i] ) )? "upgrade to "+ .group_name$[.@i] : "" )+":";
if ( getstrlen( #pp_accupgrade$ ) ) {
 sscanf #pp_accupgrade$, "%d %d", .@id, .@time;
 mes "Your account is currently a ^00CC00"+ .group_name$[.@id] +"^000000. You still have ^0000FF"+ callfunc( "timeleft__", .@time - gettimetick(2) )+"^000000.";
 if ( getstrlen( .@menu$ ) == .total_group ) close;
}
else if ( getstrlen( .@menu$ ) == .total_group ) {
 mes "Make a donation and you can upgrade your account to become Super Players ^^";
 close;
}
mes "Do you want to upgrade your account ?";
next;
.@s = select( .@menu$ );
delitem .group_idreq[.@s], 1;
#pp_accupgrade$ = .@s +" "+( gettimetick(2) + 604800 ); // 1 week
atcommand "@adjgroup "+ .@s;
mes .@name$;
mes "Your account has successfully upgraded to "+ .group_name$[1];
sc_start sc_expboost, 2147483647, 300;
// sc_start sc_itemboost, 2147483647, 100;
close;
OnPCLoginEvent:
if ( getgmlevel() > 1 )
 #pp_accupgrade$ = "";
if ( !getstrlen( #pp_accupgrade$ ) ) {
 sc_end sc_expboost;
 sc_end sc_itemboost;
 end;
}
sscanf #pp_accupgrade$, "%d %d", .@id, .@time;
.@left = .@time - gettimetick(2);
if ( .@left > 0 ) {
 atcommand "@adjgroup "+ .@id;
 if ( .@left >= 2147483 ) {
  sc_start sc_expboost, 2147483647, 300;
//   sc_start sc_itemboost, 2147483647, 100;
 }
 else {
  addtimer .@left *1000, strnpcinfo(0) +"::Ondemote";
  sc_start sc_expboost, .@left *1000, 300;
//   sc_start sc_itemboost, .@left *1000, 300;
 }
 end;
}
Ondemote:
atcommand "@adjgroup 0";
sc_end sc_expboost;
sc_end sc_itemboost;
message strcharinfo(0), "Your account has demoted to normal player";
#pp_accupgrade$ = "";
end;
OnInit:
// setarray .group_<definition>, <group ID 1>, <group ID 2>, <group ID 3>;  ... must follow the sequence in 1,2,3,4,5 ...
setarray .group_idreq[1], 31002;
setarray .group_name$[1], "Super Player";
.total_group = 1;
end;
}

Edited by Cisqua
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  56
  • Reputation:   1
  • Joined:  11/09/12
  • Last Seen:  

Hi, its been few weeks since AnnieRuru sent me this script. I've replied to her how to use this, because of what I have tested on this script, its for GM use only. I'm requesting for something that normal player can use.

Thank you for your reply.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  131
  • Reputation:   1
  • Joined:  12/29/12
  • Last Seen:  

hahaha! yes only gm can use this if segrated some tickets.. players can use this only if they want to upgrade their account to become super player.. if players have item number 31002 they use this npc just to upgrade..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  56
  • Reputation:   1
  • Joined:  11/09/12
  • Last Seen:  

I see. Let me check again. I will update you soon I figured it out. thanks.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  56
  • Reputation:   1
  • Joined:  11/09/12
  • Last Seen:  

You're right. I've checked it again and its working perfectly. Thank you so much! /thx I think I misunderstood what AnnieRuru told me.

Now the issue is: how to do expiration dates. What I have done was making 3 groups. I want something like this:

Super Player = group_id will change to 2 from its original 0 for 1 month.

Hyper Player = also group_id will change to 2 from its original 0 for 6 months.

Ultra Player = group_id will change to 2 permanently.

Edited by Rhaven
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  56
  • Reputation:   1
  • Joined:  11/09/12
  • Last Seen:  

bump!

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

Now the issue is: how to do expiration dates. What I have done was making 3 groups. I want something like this:

Super Player = group_id will change to 2 from its original 0 for 1 month.

Hyper Player = also group_id will change to 2 from its original 0 for 6 months.

Ultra Player = group_id will change to 2 permanently.

 

 
Try this
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  56
  • Reputation:   1
  • Joined:  11/09/12
  • Last Seen:  

Thanks, I will try this.

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