I got some problem with my scripts.
In general they are easy ones just that i need some help with some codes which i can't figure out.
Here the first one:
Code: Select all
use uo;
use os;
use basic;
use cfgfile;
include "include/client";
include "include/attributes";
include "equip";
program steedcloak( who, item )
var newpet;
newpet := CreateNpcFromTemplate("rarehorse", who.x, who.y,who.z);
SetObjProperty(newpet, "master", who.serial);
SetObjProperty(newpet, "prevtamed", 1);
newpet.script := "tamed";
RestartScript(newpet);
SendSysMessage(who, "Wauw! You spawned a Steed :O");
SendSysMessage(who, "You got 15 seconds to get on the mount or else it will die :(");
SendSysMessage(who, "If you ever get off the ride it will automaticlly die.");
sleep(15);
var val := HandleMods(who, item);
return val;
endprogram
As you see its not done... my questions are:
As you see, everytime you should unmount the mount you got 15 seconds to get on it again or else it should die and also the "steedcloak" should be destroyed.
DestroyItem(item); is to destroy the "steedcloak" but what code do you use to perma kill the mount if you didnt had time to "get on the horse"
or if you "take off the steedcloak".
The other script looks like this:
Code: Select all
use uo;
use os;
use cfgfile;
include "include/client";
include "include/attributes";
include "equip";
program hidinghat(who, item)
PrintTextAbove(who, "10" , 3 ,38);
sleep(1);
PrintTextAbove(who, "9" , 3 ,38);
sleep(1);
PrintTextAbove(who, "8" , 3 ,38);
sleep(1);
PrintTextAbove(who, "7" , 3 ,38);
sleep(1);
PrintTextAbove(who, "6" , 3 ,38);
sleep(1);
PrintTextAbove(who, "5" , 3 ,38);
sleep(1);
PrintTextAbove(who, "4" , 3 ,38);
sleep(1);
PrintTextAbove(who, "3" , 3 ,38);
sleep(1);
PrintTextAbove(who, "2" , 3 ,38);
sleep(1);
PrintTextAbove(who, "1" , 3 ,38);
sleep(1);
who.concealed := 1;
var val := HandleMods(who, item);
return val;
endprogram
How should i do so it takes exacly 1 second from each countdown?
Also when you unquip the "Hiding Hat" you should be revealed.( Very similiar to the question on the "steedcloak" script.
Now for the third one.
Code: Select all
use uo;
program teasingStone(who, item)
var counter := 0;
case(counter)
0: PrintTextAbove(item, "Your such a Noobie " + who.name+ ".");
1: PrintTextAbove(item, "I've got Merchants who looks like you.");
2: PrintTextAbove(item, who.name + ", Would you like to be my Merchant? HAHAHA");
3: PrintTextAbove(item, "You little Tramp! Get out of my sight!.");
endcase
counter := counter + 1;
endprogram
In general this script are just useless but my point is to know the code so i can use it in other better scripts.
When i click the ball it only shows the first text:
Your such a Noobie " + who.name+ "."
Someone know what to do?
Also one more.
I created some new vendors but when i
create the Merchant ingame i get a error looking like this:
NPC creation failed:Exception detected trying to create npc from template "rareseller":
Error loading NPC's.
And here is the script of my Rareselling merchant...
Npcdesc.cfg
Code: Select all
NpcTemplate RareSeller
{
Name <random> the RareSeller
script merchant
ObjType 0x190
Color 33770
TrueColor 33784
Gender 0
STR 200
INT 200
DEX 200
HITS 200
MANA 200
STAM 200
Privs invul
Settings invul
guardignore 1
AttackAttribute Wrestling
AttackSpeed 80
AttackDamage 5d100
dstart 10
psub 25
alignment good
wealth upper
CProp MerchantType sRareSeller
CProp Equipt sRareSeller
AttackHitScript :combat:wrestlingHitScript
OpensDoors 1
}
Code: Select all
MerchantType RareSeller
{
Sells rares
Buys rares
}
Code: Select all
ProductGroup rares
{
Item 0x9017 5 //SteedCloak
Item 0x9015 5 //InfernalRobe
Item 0x9013 5 //TeasingStone
Item 0x9005 10 //GodlyExplosionPot
Item 0x8021 5 //Fragstone
Item 0x8023 5 //Hidinghat
}
Code: Select all
NpcTemplate rareseller
{
Equipt RareSeller
}
Someone know what creates the Error? :O
That is all for now, im sure more is coming ;P
I would appreciate if someone could help
Code: Select all
Thanks.