Anti-Harm Zone

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
Ragnar
New User
Posts: 2
Joined: Thu Sep 16, 2010 6:05 am

Anti-Harm Zone

Post by Ragnar »

Hello.
I want to create one AntiHarm zone into Market but do not know how, because I have not experienced with this metal and have no idea what to do. I tried NoCombat 1 but it does not work.
Tell my where to begin.
Thank you.
User avatar
atreiu
Grandmaster Poster
Posts: 151
Joined: Mon May 24, 2010 1:08 pm

Re: Anti-Harm Zone

Post by atreiu »

oh man, so many ways (cause POL best emu ever) =)
1. regions.cfg
# EnterScript script path
# LeaveScript script path
you can setobjproerpty(who,"prop1") by EnterScript and eraseobjproperty(who,"prop1"); by LeaveScript
. in combat pkg in mainhitscript.src set:
if(getobjproperty(who,"prop1")) return; endif

2. create your library - market_lib.inc, put it include folder
function chk_market(who)
if ((who.x <= 5928) and (who.y <= 587) and // market zone. chk it by .where
(who.x >= 5904) and (who.y >= 568))
return 1;
endif
endfunction

use this function like: if(chk_market(who)) broadcast("POL best ever!"); endif

AND MAIN THING - dont forget to say THANKS to POL devs )))
Ragnar
New User
Posts: 2
Joined: Thu Sep 16, 2010 6:05 am

Re: Anti-Harm Zone

Post by Ragnar »

atreiu wrote:oh man, so many ways (cause POL best emu ever) =)
1. regions.cfg
# EnterScript script path
# LeaveScript script path
you can setobjproerpty(who,"prop1") by EnterScript and eraseobjproperty(who,"prop1"); by LeaveScript
. in combat pkg in mainhitscript.src set:
if(getobjproperty(who,"prop1")) return; endif

2. create your library - market_lib.inc, put it include folder
function chk_market(who)
if ((who.x <= 5928) and (who.y <= 587) and // market zone. chk it by .where
(who.x >= 5904) and (who.y >= 568))
return 1;
endif
endfunction

use this function like: if(chk_market(who)) broadcast("POL best ever!"); endif

AND MAIN THING - dont forget to say THANKS to POL devs )))
Thank you very much:)
I'll create one except
---------------------
Спасибо большое :)
Я всё зделал кроме

Code: Select all

#	EnterScript	script path
#	LeaveScript	script path
you can setobjproerpty(who,"prop1") by EnterScript and eraseobjproperty(who,"prop1"); by LeaveScript
I do not understand how it should look like: (((I also forgot to tell i have Pol095 ....
Sorry that did not immediately written.
------------------------------------------
Я не понял как оно должно выглядеть :((( Ещё я забыл сказать, у меня Pol095....
Извените что сразу не написал.
User avatar
atreiu
Grandmaster Poster
Posts: 151
Joined: Mon May 24, 2010 1:08 pm

Re: Anti-Harm Zone

Post by atreiu »

unfortunately i dont remember the structure of 095.

Are you from Russia?
-------------------
братан ты русский?

actually i cant understand what you dont understand =)

"script path" - do you know what this mean?

you create in.src
program good_program1(who)
setobjproperty(who,"#in_market",1);
endprogram

and create out.src
program actually_the_name_no_matter_123(who)
eraseobjproperty(who,"#in_market");
endprogram

in cofig you must set

EnterScript <path to in.src>
LeaveScript <path to out.src>
User avatar
atreiu
Grandmaster Poster
Posts: 151
Joined: Mon May 24, 2010 1:08 pm

Re: Anti-Harm Zone

Post by atreiu »

yep 095 dont have enterscript etc
then use my second variant.
xblade
New User
Posts: 18
Joined: Thu Sep 02, 2010 4:47 am

Re: Anti-Harm Zone

Post by xblade »

With that said in mind , is there a way to Have harm done to NPC's like monsters eg , but not players anywhere?
Post Reply