Jump to content
  • 0

Legendary Script


cmsm94

Question


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.02
  • Content Count:  170
  • Reputation:   5
  • Joined:  08/11/13
  • Last Seen:  

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

2 answers to this question

Recommended Posts


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


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;

}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.02
  • Content Count:  170
  • Reputation:   5
  • Joined:  08/11/13
  • Last Seen:  

OK thanks /thx

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