It is currently Wed Oct 15, 2008 11:05 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: im new can some1 help please
PostPosted: Thu May 04, 2006 4:01 pm 
Offline

Joined: Thu May 04, 2006 3:58 pm
Posts: 6
Ya im kinda new at this.. and i dont know how to me a .heal me script.. that like clicks the bandies and targets you.. automaticly Can somebody help me? :?


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 04, 2006 4:57 pm 
Offline

Joined: Thu May 04, 2006 3:58 pm
Posts: 6
make* (instead of me)
and when i say help... if you want to make the script for me.. feel free :D


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 04, 2006 5:32 pm 
Offline
Distro Developer
User avatar

Joined: Thu Apr 06, 2006 5:11 pm
Posts: 350
Location: Nederland, Texas
Please do not ask people to make scripts for you. That should be in a sticky somewhere...


Please describe the script you want in more detail and try to stick to asking more specific questions (as those are the ones that show you're actually trying and not asking us to do all your work). You wouldn't ask someone on the street to write your research paper for school, haha. Even if they were wearing a hat that said "Pro Research Paper Writer".... Well, maybe if they were wearing a HAT.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 22, 2006 10:11 pm 
Offline

Joined: Wed Apr 19, 2006 12:29 pm
Posts: 42
Location: St. Peters, MO
I don't think it's the hat so much as the name tag.

_________________
Obstacles cannot crush me; every obstacle yields to Stern Resolve.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 22, 2006 10:41 pm 
I dunno.. the sign plastered on the back did it for me :wink:


Top
  
 
 Post subject:
PostPosted: Tue May 23, 2006 1:29 pm 
Offline

Joined: Thu Feb 02, 2006 1:41 pm
Posts: 1154
Location: Southern Central USA
Well he wasn't actually demanding someone write it for him anyway. He was asking for help but threw in the "if you want to write it for me I wouldn't mind" idea as an afterthought.

I thought the response he got was rather rude actually.

Which one of us wouldn't mind a script given to us if someone wanted to offer it? I know I gladly accept the example of the Distro that the developers have provided.

I don't know too many folks who have started from nothing but the POL core and written their entire shard.

Sorry if I seem rather irritated but you will notice Kylee isn't around here anymore. The last thing we want to do is send people away because we are so arrogant that we have "arrived" and won't offer a handout occaissionally.

_________________
Sincerely,
Yukiko

I know you think you understand what you thought I said but what you heard is not exactly what I meant.

Titus 2:13


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 24, 2006 2:38 am 
Offline

Joined: Fri Feb 03, 2006 6:32 am
Posts: 104
Location: Austria
I agree with Yukiko... and maybe someone might want to answer this real simple question? Just one line of code after all!

@kylee: I asume you use the default vital functions. In that case, simply create a new file, e.g. pol/scripts/textcmd/player/healme.src and copy in the following content... then compile it and it should work for all players and staff alike. (just copy it into the corresponding command level's folder that you want)

Code:
use uo;
use os;
include "/scripts/include/attributes";

program healme(who)

  //sets the player's (who's) HP to the maximum he can have
  SetHp( who,GetMaxHp( who ));

  //feedback for the player:
  Sendsysmessage(who,"you've been healed");

endprogram


in case you got no pol/scripts/include/attributes.inc you can make one adding this content:

Code:
const VITALID_LIFE                 := "Life";

function GetMaxHp( who )
  return GetVitalMaximumValue( who, VITALID_LIFE ) / 100;
endfunction

function SetHp( who, hp )
  return SetVital( who, VITALID_LIFE, hp * 100 ) && RecalcVitals( who );
endfunction


I didn't test it, so there might be a typo, but I'd be surprised if it wouldn't work. (once it's compiled just type .healme in game and it should max your hp.

_________________
[url=www.etheria.org]
Etheria - Roleplaying Realism
Image [/url]


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 24, 2006 7:37 am 
Firedancer wrote:
I agree with Yukiko... and maybe someone might want to answer this real simple question? Just one line of code after all!


Umm.. all respect, and all, Firedancer, but the original poster's question was:

kylee wrote:
a .heal me script.. that like clicks the bandies and targets you.. automaticly


Top
  
 
 Post subject:
PostPosted: Wed May 24, 2006 11:41 am 
Offline

Joined: Fri Feb 03, 2006 6:32 am
Posts: 104
Location: Austria
Marilla wrote:
Umm.. all respect, and all, Firedancer, but the original poster's question was:

kylee wrote:
a .heal me script.. that like clicks the bandies and targets you.. automaticly


Hmm maybe I understood him wrong, but does this not mean, that he wants a .command that does the same as some bandages applied to himself would do? Ahh ok, maybe he wants it to consume bandages from the players backpack then....

Maybe that one is better then?
Code:
use uo;
use os;
include "/scripts/include/attributes";

const BANDAGE_OBJTYPE:=0xe20;
const HP_HEALED_BY_BANDAGES:=25;

program healme(who)

  //look for bandages -> search backpack
  foreach item in (EnumerateItemsInContainer( who.backpack))

    //is it a bandage?
    if(item.objtype==BANDAGE_OBJTYPE);

      //yes? -> consume one
      if(item.amount>1)
        SubtractAmount(item,1);
      else
        destroyitem(item);
      endif

      //now heal the player
      if((GetHP(who)+HP_HEALED_BY_BANDAGES)>GetMaxHp( who ))
        SetHp( who,GetMaxHp( who ));
      else
        SetHP(who,GetHP(who)+HP_HEALED_BY_BANDAGES);
      endif

      //report success
      Sendsysmessage(who,"you've been healed");
      return; //healed & done -> abort script

    endif
  endforeach
 
  //---------------------------------------
  //still here? then no bandages were found!
  Sendsysmessage(who,"you donot have any bandages");

endprogram


plus this /scripts/include/attributes.inc:

Code:
const VITALID_LIFE                 := "Life";

function GetMaxHp( who )
  return GetVitalMaximumValue( who, VITALID_LIFE ) / 100;
endfunction

function GetHp( who )
  return GetVital( who, VITALID_LIFE ) / 100;
endfunction

function SetHp( who, hp )
  return SetVital( who, VITALID_LIFE, hp * 100 ) && RecalcVitals( who );
endfunction


_________________
[url=www.etheria.org]
Etheria - Roleplaying Realism
Image [/url]


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl