Page 1 of 1

Scroll with champion names

Posted: Sat Feb 22, 2014 12:08 am
by THOM
Maybe someone can help:

I want to get a scroll with names of party members mentioned in the text. Like "Peter has to kill Paul before I let you go" or something like that...

I tried some scripting but get no results. Any ideas..??

Re: Scroll with champion names

Posted: Sat Feb 22, 2014 1:09 am
by lexdr
Have you try something like that (just before going to sleep)?

Code: Select all

spawn("scroll",party.level,party.x,party.y,"special_scroll")
:setScrollText(party:getChampion(1):getName().." has to kill "..party:getChampion(2):getName().." before I let you go")

Re: Scroll with champion names

Posted: Sat Feb 22, 2014 9:29 pm
by THOM
Sadly the only thing that is displayed is the script itself. So it is not "Peter" but "party:getChampion(4)getName()" what you can see on the scroll... :cry:

Re: Scroll with champion names

Posted: Sat Feb 22, 2014 10:18 pm
by lexdr
I think you have missed the ":" before "getName()".

I've forgotten the direction but it works for me:
- a script with the following code
- a button that runs the function

Code: Select all

function spawnscript()
	spawn("scroll", party.level, party.x, party.y, 0, "special_scroll")
	:setScrollText(party:getChampion(1):getName().." has to kill "..party:getChampion(2):getName().." before I let you go")
end
The result: "Contar Stoneskull has to kill Mork before I let you go".

Re: Scroll with champion names

Posted: Sun Feb 23, 2014 12:54 am
by THOM
Finally I got it.

I'm not a professional at scripting so I made a lot of mistakes...

But now it works!

"tschrage has to thank lexdr before I go"