View Full Version : [317] Making Donator Only Portals & items [317] C&P or snippet LOL
Xdragon
June 20th, 2010, 20:23
First open your client.java
Search for :
if (objectID == 4387)
{
toX = 2425;
toY = 3079;
}
You maybe dont have the Coords or something lol
And under the last }
if (objectID == &&&&){
if (donator == 1){
toX = xxxx;
toY = yyyy;
}
if (donator == 0){
talk("Sorry "+ playerName + " You need to be a Donator to use this Portal ", 498);
}
}
&&&& is Portal ID u need to find one or just use guthix portal like i am
xxxx = X coords
yyyy = Y coords
the 498 is a npc id u can change it if u want it
U can also change the object id to uuhm a door? then when you click on it you teleport or not lol
Now the Items
Search for :
if(wearID == 5509){
emptySmallPouch();
return false;
}
Like that
Add under the last }
if(wearID == #### && (donator != 1)) { // donater item
sM("You Need to be a Donator To Wear This");
return false;
}
Replace the #### whith your item id
Save & Compile and ur done !
Credits to me :D
Have fun !
123happy
June 20th, 2010, 20:40
Looks good! :)
Your TuT's are all over the Forum! :p
Xdragon
June 20th, 2010, 20:55
Thanks :P
Ninga Nun
June 21st, 2010, 17:05
tyvm btw do u know how to make a ::makedonator and ::takedonator command if so plz post lol tyvm anyways =]
Xdragon
June 21st, 2010, 17:28
Yw :D and Yes i know one code but it isnt mine il post it today here on the forums
dark light
June 21st, 2010, 17:33
I wanted to find this tut and it was the first guide.
Thanks for this.
Malik
June 21st, 2010, 18:07
Great tutorial, I'm adding donator to my server soon so this is gonna be useful :)
Xdragon
June 21st, 2010, 18:11
Gl whith your Server :D
XxBryantD
June 21st, 2010, 20:05
good job
Mohammad
July 1st, 2010, 10:15
Good job,
it really helped,
can you make one that player rights 0-3 can only wear it?
Xdragon
July 1st, 2010, 16:39
Just do this :
if(wearID == #### && (playerRights >= 1)) { // Staff item
sM("You Need to be a Mod/Admin/Owner To Wear This");
return false;
}
Change the right to 2/3/4/5 if u want it for admin/owner/hiddenadmin/hiddenowner Etc
Have fun whith it !
Strauss
July 2nd, 2010, 07:48
How do I make it so a teleport in the teleports tab is donor only. Like an ancients tele.
Xdragon
July 2nd, 2010, 09:05
If u change 1 tele in ancients tele than the tele in normal and lunar changes to But to make it donor only Hmm
Do it like this :
(if donor = 1) {
}
Triggertele, bla, bla
} else
sM("Ur not a Donator");
break;
Its not A real one i just made it like that so u know what to do.
lukespook
July 7th, 2010, 21:28
yea its good, but for some reason everyone can still go through the portal?
i want it to be staff only so from moderators to hidden admin 0-4 (including owner and normal admin)
if you could help me with this it would be really useful
thank you
Xdragon
July 9th, 2010, 11:56
Hmm Add this :
if (objectID == &&&&){
if (playerRights >= 1){
toX = xxxx;
toY = yyyy;
}
if (playerRights < 1){
talk("Sorry "+ playerName + " You need to be a Staff lid to use this Portal ", 498);
}
}
Or it was like this idk anymore lol [ Try both ]
if (objectID == &&&&){
if (playerRights >= 1){
toX = xxxx;
toY = yyyy;
}
if (playerRights == 0){
talk("Sorry "+ playerName + " You need to be a Staff lid to use this Portal ", 498);
}
}
There you go.
h1 sk1ller
July 12th, 2010, 10:48
Nice =}
David
July 12th, 2010, 10:50
This is actually just something of the basic...
Xdragon
July 12th, 2010, 11:05
It helps Beginners so shut up
Charlie`
July 13th, 2010, 06:42
Nice tut, well done
$$$
July 26th, 2010, 00:24
pistol pete posted a tut just like this on the old forums :/
Pistol Pete
July 26th, 2010, 00:27
pistol pete posted a tut just like this on the old forums :/
lmao I just posted it back up thnx tho
Xdragon
July 28th, 2010, 11:09
pistol pete posted a tut just like this on the old forums :/
Lol Idk who that guy is but i made this tut by myself
Pyro Sauce
August 23rd, 2010, 20:10
does not work for Project Insanity..then again..what does?
zezeye1
October 6th, 2010, 08:03
if(wearID == #### && (rights = 1)) { // donater item
sM("You Need to be a Donator To Wear This");
return false;
}
xtylerr
October 10th, 2010, 16:35
I don't understand why a portal won't spawn.
Here's my code.
}
if (objectID == 4387)
{
toX = 3088;
toY = 3485;
}
if (objectID == 4387){
if (donator == 1){
toX = 2525;
toY = 4776;
}
if (donator == 0){
talk("Sorry "+ playerName + " You need to be a Donator to use this Portal ", 498);
}
}
Do i need to spawn a portal in a file or something?
Crackhead
October 10th, 2010, 16:41
I don't understand why a portal won't spawn.
Here's my code.
}
if (objectID == 4387)
{
toX = 3088;
toY = 3485;
}
if (objectID == 4387){
if (donator == 1){
toX = 2525;
toY = 4776;
}
if (donator == 0){
talk("Sorry "+ playerName + " You need to be a Donator to use this Portal ", 498);
}
}
Do i need to spawn a portal in a file or something?
Go to client.java and search "makeGlobalObject" then you should see a list of added objects.
For example like this: makeGlobalObject(2820, 2995, 2097, 0, 10);
So, What you gotta do is like this: makeGlobalObject(CoordsX, CoordsY, ObjectID, 0, 10);
That should work.
xtylerr
October 10th, 2010, 21:50
Thanks man, that fixed it.
The only problem I'm having now is, I'm testing it out on a non donator account, and it still teleports me... :s
paymon
October 21st, 2010, 22:07
can someone help me with coding PI
saintchariz
February 28th, 2011, 22:02
for my donor portal here is what i added, idk if this will help.
ObjectManager
c.getPA().checkObjectSpawn(2465, 3205, 3438, 3, 10);
ActionHandler
case 2465:
if (c.isDonator == 1) {
c.getPA().movePlayer(####, ####, 0);
c.startAnimation(#);
break;
for the start animation just put your tele animation idk what they are
thedopekid
August 28th, 2011, 05:31
Clean up your code a bit:
if (objectID == &&&&){
if (donator == 1){
toX = xxxx;
toY = yyyy;
} else {
talk("Sorry "+ playerName + " You need to be a Donator to use this Portal ", 498);
}
Powered by vBulletin® Version 4.1.9 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.