Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7

Begging

Only working scripts
Post Reply
Edred
Moderator
Moderator
Posts: 559
Joined: 28.03.2006 21:29

Begging

Post by Edred »

Code: Select all

program BeggingUP;
// Попрошайничаем до упора у одного вендора. Скрипт без всяких наворотов.
// v.1.00. (c) Edred

{$Include 'all.inc'} 

const
Msg1 = 'You put the gold coin';
Msg2 = 'I have not enough money';
Vendor = $00004F71;

var k : Integer;
	tmptime : TDateTime;
	OldSkill : Double;

Begin
	OldSkill := GetSkillValue('Begging');
	repeat
		waitconnection(5000);
		checksave;
		if (Life < MaxLife) then UOSay('GUARDS');
		if WarMode then SetWarMode(false);
		if targetpresent then CancelTarget;
		tmptime := Now;
		UseSkill('Begging');
		WaitForTarget(5000);
		If TargetPresent then TargetToObject(Vendor);
		k := 0;
		repeat
			wait(100);
			k := k + 1;
		until (InJournalBetweenTimes(Msg1, tmptime, Now)<>-1) or (InJournalBetweenTimes(Msg2, tmptime, Now)<>-1) or (k > 300);
		if GetSkillValue('Begging') > OldSkill then
		begin
			AddToSystemJournal('Скилл Begging вырос. Теперь он равен ' + FloatToStr(GetSkillValue('Begging')));
			OldSkill := GetSkillValue('Begging');
		end;
		if Dead then AddToSystemJournal('Чар мертв!');
	until (GetSkillValue('Begging') >= 100.0) OR Dead;
End.
Post Reply