Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - erwin

Pages: 1 ... 5 6 [7] 8 9 ... 21
91
Scripting Board / Re: Trigger of the .... something
« on: July 03, 2014, 11:17:59 am »
Here is part 2, and it will be on function triggers to replace a word in a sentence, as well as to replace a character in a word.

Both function triggers are similar in execution, so hopefully it counts as one trigger of the day.

Some possibilities of these triggers (along with some modifications):

1. Make a mob rhyme with you (could replace / add on characters to the last word you say)
2. Dynamic passwords to go through a zone: (eg the second word of the password is always the day of the week)
3. Script a lot of (multi-player) games which rely on grids.

Anyway, here are these triggers!

The first trigger replaces a word in a sentence, as shown below.

Code: [Select]
Name: 'Replace word in sentence',  VNum: [33783], RNum: [ 2181]
Trigger Intended Assignment: Objects
Trigger Type: FUNCTION, Numeric Arg: 100, Arg list: None
Commands:
if !%sentence%
  %echo% Need a sentence to replace words.
  halt
endif

If !%word%
  %echo% Need a word to replace a word in the sentence.
  halt
endif

if !%replacenum%
  %echo% Need the position of the word to replace
  halt
endif

*First, find out how long the sentence is
*Recall our previous function took in the input findnumwords

set findnumwords %sentence%
function 33785

*We now have %num%, which is the length of the sentence
*Now we build up the sentence from the original sentence

if %replacenum% > 1
  extract newsentence 1 %sentence%
  set h 2
  while %h% < %replacenum%
    extract buildsentence %h% %sentence%
    set newsentence %newsentence% %buildsentence%
    eval h %h% + 1
  done
  set newsentence %newsentence% %word%
  eval h %h% + 1
elseif %replacenum% == 1
  set newsentence %word%
  set h 2
endif
while %h% <= %num%
  extract buildsentence %h% %sentence%
  set newsentence %newsentence% %buildsentence%
  eval h %h% + 1
done

This trigger takes in the inputs: sentence, replacenum, word.

sentence - Should be set to the sentence you are looking at
replacenum - The position number of the word you want to replace
word - The new word

The trigger gives the output: newsentence

So for example, suppose you have the phrase:

I am at the bottom of the world

and you want to replace the fifth word with the word top.

Then, you would do something like:

Code: [Select]
set sentence I am at the bottom of the world.
set word top
set replacenum 5
function 33783
%echo% %newsentence%

and you get your new sentence to be: I am at the top of the world

The second trigger replaces a character in a word.

Code: [Select]
Name: 'Replace character in word',  VNum: [33782], RNum: [ 2180]
Trigger Intended Assignment: Objects
Trigger Type: FUNCTION, Numeric Arg: 100, Arg list: None
Commands:

if !%word%
  %echo% Need a word to replace characters.
  halt
endif

If !%character%
  %echo% Need a character to replace a character in the sentence.
  halt
endif

if !%replacenum%
  %echo% Need the position of the word to replace
  halt
endif


set len %word.strlen%

*We now have %len%, which is the length of the word
*Now we build up the word from the original word

if %replacenum% > 1
  dg_letter newword 1 %word%
  set h 2
  while %h% < %replacenum%
    dg_letter buildword %h% %word%
    set newword %newword%%buildword%
    eval h %h% + 1
  done
  set newword %newword%%character%
  eval h %h% + 1
elseif %replacenum% == 1
  set newword %character%
  set h 2
endif
while %h% <= %len%
  dg_letter buildword %h% %word%
  set newword %newword%%buildword%
  eval h %h% + 1
done

This trigger takes in the following inputs: word, replacenum, character.

word - Should be set to the word you are looking at
replacenum - The position number of the character you want to replace
character - The new character

The trigger gives the output: newword

So for example, if you have the word

Candyland

and want something a bit more R rated, you could do the following:

Code: [Select]
set word Candyland
set character R
set replacenum 1
function 33782
%echo% newword

92
Scripting Board / Trigger of the .... something
« on: July 02, 2014, 12:07:47 pm »
This will be a post out of three posts, introducing functions, in order to achieve the goal of replacing characters of a sentence.

For example, given a string (of words, not sausages):

It was the best of times, it was the worst of times

and you want to replace the second letter of the tenth word by a u, eg to

It was the best of times, it was the wurst of times

how can you do so?

While this doesn't seem very useful from the sound of it, inventive scripters can script games (eg a game of battleship), by doing something like:

set grid .......... .......... .......... .......... .......... .......... .......... .......... .......... ..........

and if they want to fire at a position, and denote the fired position as an *, then the challenge is to convert 

.......... .......... .......... .......... .......... .......... .......... .......... .......... ..........

into

.......... .......... .......... .......... .......... .......... ...*...... .......... .......... ..........

for example.

Also, the best part about functions is that they can be reused again and again, and they just need to be called in the script. One idea is to have a zone full of (useful) functions, so all builders can call them (without taking up trigger vnums in their own zone), plus it gives some kind of signal to coders :P about which functions are useful to be added into the dg code.

As an aside, functions are very useful for doing the same things over and over again. If you have a main quest in a zone where the quest reward is only given when six side quests are done, you don't want to write the same script six times - to check if the main quest reward should be given when any of the six side quests have been completed.

So today's trigger of the day will focus on counting the number of "objects / words / items" in a variable. We will use this function in the next two posts to achieve our goal.

Input: findnumwords
Output: num

findnumwords will be the variable we are interested in finding the number of words of, and num the number of words.

Here is the function.

Code: [Select]
Name: 'function to check num words',  VNum: [33785], RNum: [ 2182]
Trigger Intended Assignment: Objects
Trigger Type: FUNCTION, Numeric Arg: 100, Arg list: None
Commands:
if !%findnumwords%
  %echo% We do not have any inputs!
  %echo% The input variable should be named findnumwords
  halt
endif
set stopping_criteria 1
set start 1
while %stopping_criteria% != stop
  extract num %start% %findnumwords%
  if !%num%
    eval num %start% - 1
    set stopping_criteria stop
  endif
  eval start %start% + 1
done

So to use the function, we just need to do this:

Code: [Select]
set findnumwords I want to be a pirate
function 33785
%echo% We have %num% of words

Of course, we can always do

Code: [Select]
set findnumwords %actor.thisvariable%
etc

The next post will be functions on replacing words in a sentence, and replacing characters in a word, before building up to the final post!

93
Scripting Board / Re: Trigger of the .... something
« on: June 23, 2014, 10:09:26 pm »
Trigger of the Day:

A sliding puzzle, which can be modified for any m*n grid, and for any tile description. It also has a visually impaired toggle. I think this is interesting because it:

1. shows how to extract the first and second words the player types after entering a command and
2. shows what %%var%% and %%%var%%% do

Set up: Here's (part of) what the player sees when he looks at the object.

"puzzle board" - See the current layout of the board
"puzzle move up" - Move a tile up into the empty space.
"puzzle move down" - Move a tile down into the empty space.
"puzzle move left" - Move a tile left into the empty space.
"puzzle move right" - Move a tile right into the empty space.
"puzzle rules" - See the rules of this puzzle.
"puzzle toggle" - Toggle for visually impaired.

and below is the trigger! If anyone has any suggestions on how to improve this, it's much appreciated :)

Code: [Select]
Trigger Intended Assignment: Objects
Trigger Type: Command, Numeric Arg: 3, Arg list: puzzle
Commands:

extract firstphrase 1 %arg%
extract secondphrase 2 %arg%

if !%coordinatex%
  set coordinatex 4
  remote coordinatex %self.id%
endif

if !%coordinatey%
  set coordinatey 4
  remote coordinatey %self.id%
endif

if !%Cord11%
  set Cord11 01
  remote Cord11 %self.id%
endif

if !%Cord12%
  set Cord12 02
  remote Cord12 %self.id%
endif

if !%Cord13%
  set Cord13 03
  remote Cord13 %self.id%
endif

if !%Cord14%
  set Cord14 04
  remote Cord14 %self.id%
endif

if !%Cord21%
  set Cord21 05
  remote Cord21 %self.id%
endif

if !%Cord22%
  set Cord22 06
  remote Cord22 %self.id%
endif

if !%Cord23%
  set Cord23 07
  remote Cord23 %self.id%
endif

if !%Cord24%
  set Cord24 08
  remote Cord24 %self.id%
endif

if !%Cord31%
  set Cord31 09
  remote Cord31 %self.id%
endif

if !%Cord32%
  set Cord32 10
  remote Cord32 %self.id%
endif

if !%Cord33%
  set Cord33 11
  remote Cord33 %self.id%
endif

if !%Cord34%
  set Cord34 12
  remote Cord34 %self.id%
endif

if !%Cord41%
  set Cord41 13
  remote Cord41 %self.id%
endif

if !%Cord42%
  set Cord42 14
  remote Cord42 %self.id%
endif

if !%Cord43%
  set Cord43 15
  remote Cord43 %self.id%
endif

if !%Cord44%
  set Cord44 EE
  remote Cord44 %self.id%
endif

if %firstphrase% == toggle && !%secondphrase%

  if !%visimp% || %visimp% == 0
    set visimp 1
    %send% %actor% You are toggling this puzzle to cater to the visually impaired.
    remote visimp %self.id%
  elseif %visimp% == 1
    set visimp 0
    %send% %actor% You are toggling this puzzle to cater to the non visually impaired.
    remote visimp %self.id%
  endif

elseif %firstphrase% == rules && !%secondphrase%
  %send% %actor% This is a sliding puzzle game, and you want to get the following layout in the end.
  if !%visimp% || %visimp% == 0
    %send% %actor% -------------------------
    %send% %actor% |     |     |     |     |
    %send% %actor% | 01  | 02  | 03  | 04  |
    %send% %actor% |     |     |     |     |
    %send% %actor% -------------------------
    %send% %actor% |     |     |     |     |
    %send% %actor% | 05  | 06  | 07  | 08  |
    %send% %actor% |     |     |     |     |
    %send% %actor% -------------------------
    %send% %actor% |     |     |     |     |
    %send% %actor% | 09  | 10  | 11  | 12  |
    %send% %actor% |     |     |     |     |
    %send% %actor% -------------------------
    %send% %actor% |     |     |     |     |
    %send% %actor% | 13  | 14  | 15  | EE  |
    %send% %actor% |     |     |     |     |
    %send% %actor% -------------------------
    %send% %actor%
    %send% %actor% EE denotes the empty space.
  elseif %visimp% == 1
    %send% %actor% 01, 02, 03, 04
    %send% %actor% 05, 06, 07, 08
    %send% %actor% 09, 10, 11, 12
    %send% %actor% 13, 14, 15, EE
    %send% %actor%
    %send% %actor% EE denotes the empty space.
  endif

elseif %firstphrase% == board && !%secondphrase%
  %send% %actor% This is the current board layout.
  if !%visimp% || %visimp% == 0
    set border -------------------------
    set inbet |     |     |     |     |
    %send% %actor% %border%
    %send% %actor% %inbet%
    %send% %actor% | %Cord11%  | %Cord12%  | %Cord13%  | %Cord14%  |
    %send% %actor% %inbet%
    %send% %actor% %border%
    %send% %actor% %inbet%
    %send% %actor% | %Cord21%  | %Cord22%  | %Cord23%  | %Cord24%  |
    %send% %actor% %inbet%
    %send% %actor% %border%
    %send% %actor% %inbet%
    %send% %actor% | %Cord31%  | %Cord32%  | %Cord33%  | %Cord34%  |
    %send% %actor% %inbet%
    %send% %actor% %border%
    %send% %actor% %inbet%
    %send% %actor% | %Cord41%  | %Cord42%  | %Cord43%  | %Cord44%  |
    %send% %actor% %inbet%
    %send% %actor% %border%
  elseif %visimp% == 1
    %send% %actor% %Cord11%, %Cord12%, %Cord13%, %Cord14%
    %send% %actor% %Cord21%, %Cord22%, %Cord23%, %Cord24%
    %send% %actor% %Cord31%, %Cord32%, %Cord33%, %Cord34%
    %send% %actor% %Cord41%, %Cord42%, %Cord43%, %Cord44%
  endif

elseif %firstphrase% == move

  if %secondphrase% == down
    *let's check if we can move anything down into the empty square
    if %coordinatex% == 1
      %send% %actor% You cannot move anything down into the empty space!
    else
      *let's see what tile should be moved down
      eval newx %coordinatex% -1
      eval tiletomove Cord%newx%%coordinatey%
    endif

  elseif %secondphrase% == up
    *let's check if we can move anything up into the empty square
    if %coordinatex% == 4
      %send% %actor% You cannot move anything up into the empty space!
    else
      eval newx %coordinatex% + 1
      eval tiletomove Cord%newx%%coordinatey%
    endif

  elseif %secondphrase% == right
    *let's check if we can move anything right into the empty square
    if %coordinatey% == 1
      %send% %actor% You cannot move anything right into the empty space!
    else
      eval newy %coordinatey% - 1
      eval tiletomove Cord%coordinatex%%newy%
    endif

  elseif %secondphrase% == left
    *let's check if we can move anything left into the empty square
    if %coordinatey% == 4
      %send% %actor% You cannot move anything left into the empty space!
    else
      eval newy %coordinatey% + 1
      eval tiletomove Cord%coordinatex%%newy%
    endif

  else
    %send% %actor% This is not a valid move command. As a reminder, the board looks like this.
  endif

  *Check if previously we had a valid move. Means variable %tiletomove% must exist

  if %tiletomove%
    eval emptytile Cord%coordinatex%%coordinatey%
    eval tmp1 %%%tiletomove%%%
    eval tmp2 %%tiletomove%%
    eval tmp3 %%emptytile%%

    *update coordinates respectively
    if %newx%
      set coordinatex %newx%
    elseif %newy%
      set coordinatey %newy%
    endif

    set %tmp2% EE
    set %tmp3% %tmp1%

    remote coordinatex %self.id%
    remote coordinatey %self.id%

    *Here, we are actually updating the variable cordXY
    remote %tmp2% %self.id%
    remote %tmp3% %self.id%
  endif

  if !%visimp% || %visimp% == 0
    set border -------------------------
    set inbet |     |     |     |     |
    %send% %actor% %border%
    %send% %actor% %inbet%
    %send% %actor% | %Cord11%  | %Cord12%  | %Cord13%  | %Cord14%  |
    %send% %actor% %inbet%
    %send% %actor% %border%
    %send% %actor% %inbet%
    %send% %actor% | %Cord21%  | %Cord22%  | %Cord23%  | %Cord24%  |
    %send% %actor% %inbet%
    %send% %actor% %border%
    %send% %actor% %inbet%
    %send% %actor% | %Cord31%  | %Cord32%  | %Cord33%  | %Cord34%  |
    %send% %actor% %inbet%
    %send% %actor% %border%
    %send% %actor% %inbet%
    %send% %actor% | %Cord41%  | %Cord42%  | %Cord43%  | %Cord44%  |
    %send% %actor% %inbet%
    %send% %actor% %border%
  elseif %visimp% == 1
    %send% %actor% %Cord11%, %Cord12%, %Cord13%, %Cord14%
    %send% %actor% %Cord21%, %Cord22%, %Cord23%, %Cord24%
    %send% %actor% %Cord31%, %Cord32%, %Cord33%, %Cord34%
    %send% %actor% %Cord41%, %Cord42%, %Cord43%, %Cord44%
  endif
else
  %send% %actor% This is not a valid puzzle command.
  return 1
end

94
Suggestions & Ideas / Re: Sweetheart PK Tournament
« on: August 10, 2013, 11:50:01 am »
Perhaps we can have an event where the competitors try to steal treasure from a dragon, rescue their significant other, and then compete in a maze for the tri-event tournament? :D

95
News & Announcements / Re: Building Contest
« on: July 14, 2013, 06:19:18 pm »
An African school after apartheid was abolished

Zone 337 - 100 rooms

96
Scripting Board / Re: A room counter
« on: June 07, 2013, 02:30:51 pm »
I've been told that a long string is not as efficient because DG doesn't store strings very well.

Not to mention, without a replace character command, looping through a 100 character string isn't very efficient. Neither are doing operations on the string since then the string would be a 100 digit number...

97
Scripting Board / Re: A room counter
« on: June 07, 2013, 08:52:50 am »
Well, my idea is, suppose you had 10 flags on you, africanexploredtens0, africanexploredtens1, ..., africanexploredtens9.

africanexploredtens4 is currently set at 0011011001

The idea is, once you step into a room (eg, room vnum 12345), we have set tens %num.charat(4)%, and I'm hoping to link this to the flag africanexploredtens4, so we check whether the 5th position is a 0 or 1.

Hence I have set tensvar africanexploredtens%tens%.

What I'm hoping is that %actor.tensvar% (or some sort of variant) will give me the flag 0011011001, so I can check whether the respective position is 0 or 1.

98
Scripting Board / Re: A room counter
« on: June 06, 2013, 11:48:59 pm »
I think Now says he'll put the command in soon.

I also have another question.

Suppose the player has a flag called africanexploredtens4

You would normally call this by %actor.africanexploredtens4%.

However, suppose the player is in room 12345. Using the code

Code: [Select]
set num %actor.room.vnum%
eval tens %num.charat(4)%
set tensvar africanexploredtens%tens%

we will have tensvar to be africanexploredtens4.

However, how would I then modify this flag? The following syntaxes:

Code: [Select]
%actor.tensvar%
%actor.%tensvar%%
%actor.%tensvar%
%%actor.tensvar%%

doesn't work for me, because the system interprets it as a flag called tensvar, instead of africanexploredtens4.

Anyone have any ideas?

99
Scripting Board / Re: A room counter
« on: June 06, 2013, 08:39:21 am »
My script would be just putting the flag

0000..0000000

on the player.

When the relevant room, say k is entered, we'll check if the kth position is a 0 or a 1.

If it is a 0, we change it to a 1. Update counter by 1.

This is the problem I have. How do we change the kth position of a flag? eg, suppose I have the flag value 123, and I want to change it to 143. Apart from adding 20 to it, how do I change the 2 to a 4?

Furthermore, expressions like 10^2 isn't recognized - the output will be 10^2 instead of 100, so even a workaround by adding would be a pain.[/i]

If the kth position is a 1, check if the flag is 111..1111.

If it is 111....111, we give player a new flag - explored, and delete the messy 111...111 flag.

I'll look through the above script later when I'm at the office.

100
Scripting Board / Re: A room counter
« on: June 06, 2013, 12:59:43 am »
I can bring this down to 2-3 flags in worst case scenario, as opposed to 50 flags - I have the outline of the script (hint - it uses the charat function), so I'll do it in the weekend. Here's a short exercise for all of you.

Q1: What is the maximum string length a flag can hold? [5 marks]
Q2: Suppose a zone has seven rooms. Using the string 1100011, we can say that the first 2 rooms have been explored, the next three rooms have not, and the last two have. With this idea, write code to improve the previous script for the worse case scenario of flags [20 marks]

101
Scripting Board / A room counter
« on: June 04, 2013, 11:12:44 pm »
Suppose you want to give a player a challenge to explore the entire zone, and tell the player how many rooms he or she has yet to find. This is not easy to script, because a zone with 100 rooms might necessitate 100 (different) flags on the player.

It is possible to make a script (using the following outline shown) to reduce the worst case scenario of the number of flags to {Number of rooms /2} by considering the vnums in binary. However, it might be possible to reduce this number further - unfortunately I don't know what (other) commands I can use in scripting.

Therefore, here is a test case by considering vnums in base 10. While this is inefficient (it's not in base 2), the outline of the code is relatively easier to follow.

I would also like to know whether it's possible to create for loops in scripts - then the following code can be further compacted.

I have resorted to a hack - putting this as a room enter trigger, so this necessitates that *every* room have this trigger. Ideally, I'd like to have this trigger on an object in the player's inventory - so that if the player moves, then the object will trigger, and tally the number of rooms.

If anyone has any suggestions for improvements, or any shortcuts which I have overlooked, do post here, so everyone can benefit :)

Code: [Select]
*Code works like this:
*Every 10vnums are grouped together, from 00-09, 10-19, 20-29, .., 90-99
*Flags are labelled africanexplored0, africanexplored1, .. africanexplored99
*But if you have a group of 10, say africanexplored0, .. africanexplored9
*then you'll get the flag africanexploredtens0 (the tens0 denotes the tens
*position as 0). So here, the worst case scenario is the player gets 9 of each
*group, and has 90 extra flags. The 91st flag would mean the player completes
*one group of 10, and hence reduce the number of flags from 90 to 81.
*Of course, we can group 2 vnums together, to reduce the worst case scenarion
*to 50. I think this can be even reduced further, but I'm not sure what
*commands I'm able to use.

*For the code below, you can see I've only been using "if" statements, as
*I'm not sure if for loops, etc exists.

if %actor.is_pc%
if !%actor.varexists(africanexploredall)%
*The flag africanexploredall means you've been to all the rooms
*So suppose you haven't
eval NUM %actor.room.vnum%
eval ABSNUM %NUM% -33700
                *We want the last two digits of the vnum - we're assuming the zone has 100 rooms, and given zone 337
eval TENS %ABSNUM%/10
                *We want the digit in the 10s place
eval TENSVAR africanexploredtens%TENS%
                *Create the variable which corresponds to the 10sdigit
eval ABSNUMVAR africanexplored%ABSNUM%
                *Create the variable which corresponds to the last two digits of the vnum
%echo% My room number is %NUM%
%echo% My tens is %TENS%
%echo% I belong to %TENSVAR%
%echo% and %ABSNUMVAR%
%echo% My absolute number is %ABSNUM%
*TENS will be from 00-09
if  !%actor.varexists(%TENSVAR%)% && !%actor.varexists(%ABSNUMVAR%)%
%echo% I haven't been in this room yet%
set %ABSNUMVAR% 1
remote %ABSNUMVAR% %actor.id%
                                *Put your room counter here and make it increase by 1
endif
*check per 10 rooms
                        *A for loop would be nice here (needless to say, for binary case
                        *it's somewhat easier as we can look at %NUM%/2, %NUM%+1/2
                        *etc)
eval T1 %TENS% * 10
eval T1VAR africanexplored%T1%
eval T2 %T1% + 1
eval T2VAR africanexplored%T2%
eval T3 %T1% + 2
eval T3VAR africanexplored%T3%
eval T4 %T1% + 3
eval T4VAR africanexplored%T4%
eval T5 %T1% + 4
eval T5VAR africanexplored%T5%
eval T6 %T1% + 5
eval T6VAR africanexplored%T6%
eval T7 %T1% + 6
eval T7VAR africanexplored%T7%
eval T8 %T1% + 7
eval T8VAR africanexplored%T8%
eval T9 %T1% + 8
eval T9VAR africanexplored%T9%
eval T10 %T1% + 9
eval T10VAR africanexplored%T10%
%echo% My 10 variables are
%echo% %T1VAR%
%echo% %T2VAR%
%echo% %T3VAR%
%echo% %T4VAR%
%echo% %T5VAR%
%echo% %T6VAR%
%echo% %T7VAR%
%echo% %T8VAR%
%echo% %T9VAR%
%echo% %T10VAR%
if %actor.varexists(%T1VAR%)% && %actor.varexists(%T2VAR%)% && %actor.varexists(%T3VAR%)% && %actor.varexists(%T4VAR%)% && %actor.varexists(%T5VAR%)% && %actor.varexists(%T6VAR%)% && %actor.varexists(%T7VAR%)% && %actor.varexists(%T8VAR%)% && %actor.varexists(%T9VAR%)% && %actor.varexists(%T10VAR%)%
%echo% I've been in a set of 10 rooms
%echo% so I'm adding %TENSVAR% to me
%echo% Check to see I have this
set %TENSVAR% 1
remote %TENSVAR% %actor.id%
rdelete %T1VAR% %actor.id%
rdelete %T2VAR% %actor.id%
rdelete %T3VAR% %actor.id%
rdelete %T4VAR% %actor.id%
rdelete %T5VAR% %actor.id%
rdelete %T6VAR% %actor.id%
rdelete %T7VAR% %actor.id%
rdelete %T8VAR% %actor.id%
rdelete %T9VAR% %actor.id%
rdelete %T10VAR% %actor.id%
endif
*check all rooms
if %actor.varexists(africanexploredtens0)% && %actor.varexists(africanexploredtens1)% && %actor.varexists(africanexploredtens2)% && %actor.varexists(africanexploredtens3)% && %actor.varexists(africanexploredtens4)% && %actor.varexists(africanexploredtens5)% && %actor.varexists(africanexploredtens6)% && %actor.varexists(africanexploredtens7)% && %actor.varexists(africanexploredtens8)% && %actor.varexists(africanexploredtens9)%
%echo% If I am triggered, I have explored everywhere
%echo% Check to see if I have the complete flag!
set africanexploredall 1
remote africanexploredall %actor.id%
rdelete africanexploredtens0 %actor.id%
rdelete africanexploredtens1 %actor.id%
rdelete africanexploredtens2 %actor.id%
rdelete africanexploredtens3 %actor.id%
rdelete africanexploredtens4 %actor.id%
rdelete africanexploredtens5 %actor.id%
rdelete africanexploredtens6 %actor.id%
rdelete africanexploredtens7 %actor.id%
rdelete africanexploredtens8 %actor.id%
rdelete africanexploredtens9 %actor.id%
endif
endif
endif

Now, it just suffices to put a counter whenever the player enters a new room to increase the rooms explored by 1! Tada!

102
Scripting Board / Object Script syntax for object entering rooms
« on: June 04, 2013, 06:45:42 pm »
Hi all,

I'm not very sure about the different types of Object scripts, so here's an example of what I would like to happen.

I'm looking for a trigger to put on an object carried by a player. When the player enters the room, the object will check the vnum of the room. If the vnum is a certain number, then something happens.

I'm guessing this is ObjEnter type of trigger, but I'm not sure what the syntax is.

Help given would be appreciated. Thanks!

103
Suggestions & Ideas / Re: Easy Obtainable Items
« on: February 21, 2012, 05:58:44 am »
Legend

A gorgeous bouquet of fresh flowers: +1 WIS
The fingerbone of a thief: +2 DEX (tricky)

104
Suggestions & Ideas / Re: Easy Obtainable Items
« on: February 17, 2012, 09:02:31 pm »
Dry Gulch II

A horse blanket: +2INT
A pair of sharp spurs: +2HR +2DR
A pair of chaps: +2HR
A green rooster feather: +5DR (Not sure if quest item, but relatively tricky to get)

105
Suggestions & Ideas / Re: Easy Obtainable Items
« on: February 17, 2012, 09:00:49 pm »
The Range


A saddle: +2STR
A black stetson hat: +2STR
A broadrimmed white hat: +2INT
A pair of cowhide chaps: +3HR
A pair of high-heeled cowboy boots: +2DR
A pair of leather boots: +2STR

Pages: 1 ... 5 6 [7] 8 9 ... 21