Jump to content
  • 0

How to write a script for no vending on streets in towns


Question

Posted

Okay so one possible solution for my solution is using the mapflag..

How will I write it using mapflag for example I want to implement no vending on streets policy in towns?

Are there any other solutions instead of mapflag?

3 answers to this question

Recommended Posts

Posted (edited)
*setcell "<map name>",<x1>,<y1>,<x2>,<y2>,<type>,<flag>;

Each map cell has several 'flags' that specify the properties of that cell.

These include ... no vending ...

Examples:

setcell "arena",0,0,300,300,cell_basilica,1;
setcell "arena",140,140,160,160,cell_basilica,0;
setcell "arena",135,135,165,165,cell_walkable,0;
setcell "arena",140,140,160,160,cell_walkable,1;

From const.txt:

cell_walkable 0
cell_shootable 1
cell_water 2
cell_npc 3
cell_basilica 4
cell_landprotector 5
cell_novending 6
cell_nochat 7

Edited by plankt
  • Upvote 1
Posted

Take this one I made as example:

-    script    Setcell#func    -1,{

OnInit:
setcell "dellar",96,119,107,102,cell_novending,1;
setcell "dellar",76,103,121,34,cell_novending,1;
setcell "dellar",54,95,132,32,cell_novending,1;
setcell "dellar",145,97,76,34,cell_novending,1;
setcell "dellar",144,150,120,102,cell_novending,1;
setcell "dellar",62,149,84,101,cell_novending,1;
setcell "dellar",88,126,96,118,cell_novending,1;
setcell "dellar",112,126,119,117,cell_novending,1;
end;
}

This disables vending across the map except for the red zones:

dellarvend.png

  • Upvote 1

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