Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-19-2010, 01:29 AM
Imperialistic Imperialistic is offline
graal player lord
Imperialistic's Avatar
Join Date: Apr 2007
Location: Florida
Posts: 1,094
Imperialistic is a jewel in the roughImperialistic is a jewel in the rough
You're not showing any willingness to learn, you should take seriously to what fowlplay4 is telling you, if you want to be warped just replace:

hide(); --> setlevel2("blah.nw", x , y);
and
player.chat = "Access Denied!"; --> setlevel2("blah2.nw", x, y);
__________________
" It's been swell, but the swelling's gone down. "
Reply With Quote
  #2  
Old 03-19-2010, 01:35 AM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
!

Quote:
Originally Posted by Imperialistic View Post
You're not showing any willingness to learn, you should take seriously to what fowlplay4 is telling you, if you want to be warped just replace:

hide(); --> setlevel2("blah.nw", x , y);
and
player.chat = "Access Denied!"; --> setlevel2("blah2.nw", x, y);
okay, fine i want to learn

I don't understand this part:

PHP Code:
// Define guild that can use door 
  
if (!this.guildaccessthis.guildaccess "Staff"
  
// Give door shape (prevents transparent image cheat) 
  
this.setshape(13232); 
__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?
Reply With Quote
  #3  
Old 03-19-2010, 01:57 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by jkldogg View Post
okay, fine i want to learn
I don't understand this part: code..
Those are fail-safes.

if (!this.guildaccess) - Checks if the this.guildaccess is not 0

this.guildaccess = "Guild Name" - Sets this.guildaccess to a default value if it's not defined or equals 0.

this.setshape(1, 32, 32); - My example sets the size of the npc to a blocking type (1), and to block 32 by 32 pixels (or 2 by 2 tiles since tiles are 16 pixels in width and height).

Also, yes your script is relatively small, simple, quick but lacks reuse-ability and will be a pain to have to go and replace it everywhere it's used if you want to change it's behavior.

P.S. Don't leave the code in PHP tags in your quotes, just makes it easier on people tbh.
__________________
Quote:
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:50 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.