PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
Stable Master

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> General Help (095)
Display posts from previous:   

Author Message
Poi



Joined: 14 Apr 2006
Posts: 203

PostPosted: Sat Aug 19, 2006 2:47 pm    Post subject: Stable Master Reply with quote

In stablemaster.src(AI) If i change

Quote:
if(GetObjProperty(ticket, "StableMaster") != me.serial)
PrintTextAbovePrivate(me, "This doesnt seem to be one of my tickets, please take it to the stable master who issued it.", player);
MoveItemToContainer(ticket, player.backpack);
return;
elseif(!canclaim(player,GetObjProperty(ticket, "pettemplate")))
say("You have no chance of controlling that!");
return;
endif


to


Quote:
if(GetObjProperty(ticket, "StableMaster") != me.serial)
say("One moment please...");
elseif(!canclaim(player,GetObjProperty(ticket, "pettemplate")))
say("You have no chance of controlling that!");
return;
endif



Would that remove the part that makes it so you can only take it to that specific stable master?

Author Message
Pierce



Joined: 02 Feb 2006
Posts: 256

PostPosted: Sat Aug 19, 2006 5:40 pm    Post subject: Reply with quote

I don't know your scripting, but it seems that the stablemaster serial, where the pet is stabled is stored as CProp "StableMaster" on the ticket.
If you don't won't that you can ignore that ticket cprop, or better don't save it on the ticket.

If it is on the ticket you can save script performance time if you use:

Code:

if(!canclaim(player,GetObjProperty(ticket, "pettemplate")))
say("You have no chance of controlling that!");
return;
endif


If that's what you want, you should remove the saving of the serial of the stablemaster on the ticket. Because in this case it is useless.

Author Message
Poi



Joined: 14 Apr 2006
Posts: 203

PostPosted: Sat Aug 19, 2006 6:41 pm    Post subject: Reply with quote

Eh ok new problemo..
Uhm, it tells me he doesnt have this pet... any ideas on how i could fix this? Maybe write a whole new simple script..

Ok i did this
Code:
    if(!pet)
CreateNpcFromTemplate( pet, player.x, player.y, player.z );
    endif


and got an error(in game) it said "take care of error text = "Object does not support members" be sure to feed it!

entire function:

Code:
function Load_Ticket_Data(player, ticket)
    if(!canclaim(player,GetObjProperty(ticket, "pettemplate")))
    say("You have no chance of controlling that!");
    return;
  endif
  var tempdata := 0;
  var newpet := 0;
  var pet;
  if(ticket.objtype == 0x14f0)
    tempdata := GetObjProperty(ticket, "petserial");
    say("Oh, let me find your pet for you. One moment, please.");
    sleep(1);
    var petserial := GetObjProperty(ticket, "petserial");
    mystorage := GetObjProperty(me, "Pets");
    if(petserial in mystorage)
      pet := SystemFindObjectBySerial(petserial);
    endif
    if(!pet)
CreateNpcFromTemplate( pet, player.x, player.y, player.z );
    endif
    SetObjProperty(pet, "master", player.serial);
    SetObjProperty(pet, "prevtamed", 1);
    EraseObjProperty(pet,"stabled");
    EraseObjProperty(pet,"days");
   pet.script := "tamed";
    RestartScript(pet);
    RevokePrivilege(pet, "invul");
    MoveCharacterToLocation(pet, player.x, player.y, player.z, MOVECHAR_FORCELOCATION);
    var holder := array;
    mystorage := GetObjProperty(me, "Pets");
    foreach thing in mystorage
      if(thing != pet.serial)
        holder.append(thing);
      endif
    endforeach
    mystorage := holder;
    SetObjProperty(me, "Pets", mystorage);
    EraseObjProperty(pet, "NextCounter");
    say("Take care of " + pet.name + " and be sure to feed it!");
    DestroyItem(ticket);
  else
    TakeItem(player, ticket);
  endif
endfunction

Author Message
Poi



Joined: 14 Apr 2006
Posts: 203

PostPosted: Mon Aug 21, 2006 5:56 pm    Post subject: Reply with quote

Bump... As to the post above, it does not creat the pet either.

Author Message
Poi



Joined: 14 Apr 2006
Posts: 203

PostPosted: Thu Aug 24, 2006 5:09 pm    Post subject: Reply with quote

bump, please help my shard is growing and this is becoming increasingly a problem... And school just started so i dont have as much time to script..

Post new topic   Reply to topic    PenUltima Online Forum Index -> General Help (095) All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty