Jump to content
  • 0

How to allow vending only if the user has some item?


eKoh

Question


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  206
  • Reputation:   13
  • Joined:  01/07/12
  • Last Seen:  

Hello guys. I want to make a Market zone, that allows you to sell beside the main street of prontera only if you carry a Market Permit (Item ID: 26008) and I also want to make that the duration of autotrade increase from 10h to 12h. I hope it is possible =)

 

2ykknxu.jpg

 

In example:

 

Market zone is prontera, from 140, 180 to 140, 164 and 147, 173 to 147, 164. I want to assign these specifics areas to the Market zone.

 

23kqji8.jpg

 

Thank you for any help :3!


any help? please

Edited by eKoh
Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  206
  • Reputation:   13
  • Joined:  01/07/12
  • Last Seen:  

I hate you guys, you made me work>:(! The script is working, here it is:

 

-    script    MarketPermission    -1,{
OnInit:
//Market Permit
set .map$,"prontera"
setcell .map$,0,0,284,365,cell_novending,1;
setcell .map$,147,173,147,164,cell_novending,0;
setcell .map$,140,180,140,164,cell_novending,0;
end;

OnTouch:
    if(countitem(26008) == 0){
        mes "[^0000FFMarket Permission^000000]";
        mes "Sorry you don't have any ^FF0000Market Permit^000000.";
        mes "You can get it from the ^0000FFExchange Girl^000000.";
        next;
        warp "prontera",155,175;
    }
    else{
        mes "[^0000FFMarket Permission^000000]";
        mes "Great!";
        mes "You have ^0000FFpermission^000000 to sell here!";
        mes "Use your time wisely.";
        close;
    }    
    end;
}

prontera,147,168,4    duplicate(MarketPermission)    test1    139,0,5 // will warp the players if they do not have the item
prontera,140,172,4    duplicate(MarketPermission)    test2    139,0,8 // will warp the players if they do not have the item
prontera,140,163,4    duplicate(MarketPermission)    test2    139,0,1 // will warp the players if they do not have the item

 

Well, there are some invisible NPCs that makes the work, "MarketPermission".

 


prontera,147,168,4    duplicate(MarketPermission)    test1    139,0,5 // will warp the players if they do not have the item

Whenever a player stands on a radius of 0 cells in " x " and 5 cells in " y ", of these coordinates 147,168 (That means from 147,163 to 147,173) will appear a script.

 

It is simple, if you don't carry the required item, it warps you to the middle of prontera, if you do, you'll simply stay there and can sell.

 

If you guys find any possible bug, please tell me =)!

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