The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help in general Scripting
Author Message
Fronz
Apprentice
*

Posts: 36
Likes Given: 2
Likes Received: 0 in 0 posts
Joined: Apr 2016
Reputation: 0



Post: #1
Need help in general Scripting
I'm currently developing a server on v0.56b and it's very very close to be finished. Just need to polish some stuff.

Problem is my scripting skills are limited. I've managed to solve most errors on console with no problem, but I still get a few ones that are very annoying that I don't understand.

I need someone that can help me with fixing some errors and on improving the server. I'm not asking for someone to make me scripts. If you want to add scripts and if I think it fits, please be my guest.

I just want some help on how to run a healthy sphere.

Much Love,
Fronz.
(This post was last modified: 04-21-2016 10:30 AM by Fronz.)
04-21-2016 10:24 AM
Find all posts by this user Like Post Quote this message in a reply
Criminal
Journeyman
*

Posts: 182
Likes Given: 38
Likes Received: 22 in 22 posts
Joined: Jun 2015
Reputation: 0

SantiagoUO.com

Post: #2
RE: Need help in general Scripting
just post what scripts are giving errors

[Image: mfqAZnj.png]
Discord: SantiagoUO
Skype:
criminaluo
04-21-2016 03:49 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Fronz
Apprentice
*

Posts: 36
Likes Given: 2
Likes Received: 0 in 0 posts
Joined: Apr 2016
Reputation: 0



Post: #3
RE: Need help in general Scripting
Is it possible to make an AREA that you can't attack other players but you can attack Monsters?
Also is it possible to make an AREA that is a SAFE ZONE but you can still raise skills in it?

If the first one is possible no need to do the second one.


How do I set an item not to decay? Some items when you do .set timer -1 to them after a world save or some time they decay.
Example:
ERROR:UID=0438b8bd6, id=01070 'training dummy', Invalid code=2236 (Item flagged as decay but without timer set)

Thanks,
Fronz.
(This post was last modified: 04-23-2016 02:09 AM by Fronz.)
04-23-2016 12:03 AM
Find all posts by this user Like Post Quote this message in a reply
Criminal
Journeyman
*

Posts: 182
Likes Given: 38
Likes Received: 22 in 22 posts
Joined: Jun 2015
Reputation: 0

SantiagoUO.com

Post: #4
RE: Need help in general Scripting
[AREADEF arena1]
NAME=arena1
GROUP=arena1
P=123,123,1,0
RECT=123,123,321,321,0
FLAGS=region_flag_nopvp

http://wiki.sphere.torfo.org/index.php/AREADEF

[Image: mfqAZnj.png]
Discord: SantiagoUO
Skype:
criminaluo
04-23-2016 07:24 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Criminal
Journeyman
*

Posts: 182
Likes Given: 38
Likes Received: 22 in 22 posts
Joined: Jun 2015
Reputation: 0

SantiagoUO.com

Post: #5
RE: Need help in general Scripting
about the timer thing it is because the training dummy has the attr attr_decay

[Image: mfqAZnj.png]
Discord: SantiagoUO
Skype:
criminaluo
04-23-2016 05:30 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Fronz
Apprentice
*

Posts: 36
Likes Given: 2
Likes Received: 0 in 0 posts
Joined: Apr 2016
Reputation: 0



Post: #6
RE: Need help in general Scripting
The "region_flag_no_pvp" was the first thing I did. It doesn't work. If I do that, besides not being able to attack other players I can't attack any other mob. It just doesn't attack anything.

Currently the flags I have are
FLAGS=region_flag_nobuilding|region_antimagic_recall_in|region_antimagic_recall_​out|region_antimagic_gate|region_flag_no_pvp


The item thing yeah, might be that. Gonna reset the attributes before putting an item down.

Kudos,
Fronz.
(This post was last modified: 04-23-2016 11:53 PM by Fronz.)
04-23-2016 11:41 PM
Find all posts by this user Like Post Quote this message in a reply
Criminal
Journeyman
*

Posts: 182
Likes Given: 38
Likes Received: 22 in 22 posts
Joined: Jun 2015
Reputation: 0

SantiagoUO.com

Post: #7
RE: Need help in general Scripting
make an event in the area

@hittry
if (<src.isplayer>)
sysmessage you can't attack players
return 1
endif

[Image: mfqAZnj.png]
Discord: SantiagoUO
Skype:
criminaluo
04-24-2016 01:46 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Fronz
Apprentice
*

Posts: 36
Likes Given: 2
Likes Received: 0 in 0 posts
Joined: Apr 2016
Reputation: 0



Post: #8
RE: Need help in general Scripting
Okey! It works for the Combat Attack. I'm trying to do for the spellcast, but I'm missing something.

[REGIONTYPE r_newbiedungeon]
ON=@ENTER
SRC.EVENTS=+e_dungeonnewbie
SRC.EVENTS=+e_dungeonnewbie2
ON=@EXIT
SRC.EVENTS=-e_dungeonnewbie
SRC.EVENTS=-e_dungeonnewbie2


[EVENTS e_dungeonnewbie]
On=@hittry
if (<src.isplayer>)
sysmessage you can't attack players
return 1
endif

[EVENTS e_dungeonnewbie2]
On=@SpellCast
if (<src.isplayer>)
sysmessage you can't attack players
return 1
endif



On the SpellCast, I can't attack players with spells but I can't also attack monsters. Shouldn't the src.isplayer on the SpellCast work like it works with hittry?


Love,
Fronz.
(This post was last modified: 04-24-2016 03:22 AM by Fronz.)
04-24-2016 03:21 AM
Find all posts by this user Like Post Quote this message in a reply
Criminal
Journeyman
*

Posts: 182
Likes Given: 38
Likes Received: 22 in 22 posts
Joined: Jun 2015
Reputation: 0

SantiagoUO.com

Post: #9
RE: Need help in general Scripting
@SpellEffect
if (<src.isplayer>)
src.sysmessage you can't attack players
return 1
endif

Check in wiki the tiggers
http://wiki.sphere.torfo.org/index.php/@SpellEffect

Like:
The following object references are explicitly available for this trigger:
Name Description
ARGO The item used to cast the spell (e.g. a wand or scroll).
I The character or item being hit by the spell.
SRC The character responsible for the spell.

@spelleffect fire when you recive any spell, so SRC is who cast the spell, then you check if isplayer and prevent damage with return 1

[Image: mfqAZnj.png]
Discord: SantiagoUO
Skype:
criminaluo
04-24-2016 06:31 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Fronz
Apprentice
*

Posts: 36
Likes Given: 2
Likes Received: 0 in 0 posts
Joined: Apr 2016
Reputation: 0



Post: #10
RE: Need help in general Scripting
Aye! It works. Thanks man!

I'll keep this thread alive to keep asking stuff.

Cheers,
Fronz.
04-24-2016 09:25 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 5 Guest(s)