Jump to content
  • 0

Legendary Script


Question

Posted (edited)
-    script    Sample    -1,{

    OnPCLoginEvent:

        if ( !#FreeStats ) {

            StatusPoint += 1000;

            set #FreeStats, 1;

        }

        end;

}

Credits to the creator i forgot where i copied this from.

 

 

Can someone make for me a npc that allows you to do the quest of this npc only for 10 times? Example

 

1st quest 10jellopy and 10tcg = 1000 status point

2nd quest 10 jellopy and 10 tcg = 1000 status point

and so on same item = so on same points

 

1 Character only allows to do this quest to 10 times only. I don't know how to do that. Please someone guide.

Edited by cmsm94

2 answers to this question

Recommended Posts

Posted


prontera,150,182,5 script ojnojio 78,{

if ( #statusQuest < 10 ) {

mes "I can add "+ .status_points +" status points in exchange for:";

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

mes "x"+ .amount_req[.@i] +" ^ff0000"+ getitemname( .item_req[.@i] ) +"^000000 (ID: "+ .item_req[.@i] +")";

next;

mes "You have done the quest "+ #statusQuest +" times for now.";

next;

if ( select( "I have all the items", "Leave" ) == 2 ) {

mes "good bye.";

close;

}

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

if ( countitem( .item_req[.@i] ) < .amount_req[.@i] ) {

if ( .@tmp == 0 ) {

.@tmp = 1;

mes "You miss :";

}

mes "- ^ff0000"+ ( .amount_req[.@i] - countitem( .item_req[.@i] ) ) +"/"+ .amount_req[.@i] +"^000000 "+ getitemname( .item_req[.@i] ) +" (ID: "+ .item_req[.@i] +")";

}

if ( .@tmp ) close;

mes "Ok seems good, here your "+ .status_points +" status points.";

StatusPoint = StatusPoint + .status_points;

#statusQuest++;

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

delitem .item_req[.@i], .amount_req[.@i];

close;

}

mes "You already have done the quest 10 times.";

close;

Oninit:

.status_points = 1000;// amount of status points

setarray .item_req, 502,503,504;// item id required

setarray .amount_req, 1,2,5;// amount

.size_item = getarraysize( .item_req );

end;

}

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...